-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
64 lines (44 loc) · 1.48 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
from flask import Flask, render_template, request, redirect, url_for, send_from_directory
from hoyo import getJSON, main;
from waitress import serve;
import asyncio
app = Flask(__name__)
@app.route('/')
def index():
# return render_template('load.html')
return render_template('profile.html')
@app.route('/create_file', methods=['POST'])
def create_file():
if request.method == 'POST':
print(request.form)
a = asyncio.run(main(request.form['uid']))
# print(a)
return (str(a))
@app.route('/load_uid_py', methods=['GET', 'POST'])
def load_uid_py():
if request.method == 'POST':
print("a")
return render_template('load_uid.html')
# show the form, it wasn't submitted
return render_template('load_uid.html')
@app.route('/profile_py', methods=['GET', 'POST'])
def profile_py():
if request.method == 'POST':
print("a")
return render_template('profile.html')
# show the form, it wasn't submitted
return render_template('profile.html')
@app.route('/relic_ranking_py', methods=['GET', 'POST'])
def relic_ranking_py():
if request.method == 'POST':
print("a")
return render_template('relic_ranking.html')
# show the form, it wasn't submitted
return render_template('relic_ranking.html')
if __name__ == '__main__':
# app.run(
# host='127.0.0.1',
# port=5001,
# debug=True
# )
serve(app, host='0.0.0.0', port=5001)