Open xoyabc opened 6 years ago
One more question,would you please tell me how to export cookies in LWP Set-Cookie3 format.Waiting your reply,thanks
You should just double click the local file named index.html
to open it in your browser, for some historical reason the front-end is pure static and uses jsonp to communicate with the server.
You can use Chrome extensions like EditThisCookie to export your cookies in LWP Set-Cookie3 format. But I strongly recommend against using your own cookies as it might easily get your account banned.
@Wildog It works now.Thanks a lot.
You should just double click the local file named index.html to open it in your browser
The running environment should be windows or Mac if I double click the local file,right?
I make some changes today and it sounds work.The changes I make are as follows. 1.My running environment is CentOS6.5 before,today I create the directory “templates” and "static" and copy index.html to templates,copy assets to static
cp index.html templates/
cp -ar assets/ static/
2.import the render_template template
from flask import Flask, Response, request, send_file, current_app, render_template 3.replace "assets/" with "/static/"
<link rel="stylesheet" href="/static/bootstrap.min.css" type="text/css" media="all" /> <link rel="stylesheet" href="/static/bootstrap-select.min.css" type="text/css" media="all" /> <script src="/static/jquery-3.1.1.min.js" type="text/javascript" charset="utf-8"></script> <script src="/static/bootstrap.min.js" type="text/javascript" charset="utf-8"></script> <script src="/static/bootstrap-select.min.js" type="text/javascript" charset="utf-8"></script>
4.Add a route named "/" to exporter.py
@app.route("/",methods=['GET','POST']) def index(): return render_template("index.html")
5.Run python exporter.py,visit the page "http://192.168.10.234:8000/",and the http status code is 200
HI,when I open index.html in the browser,it turn out to be 404,pls give me some help and many thanks in advance.