This repository has been archived by the owner on Oct 20, 2023. It is now read-only.
generated from opq-osc/botoy-plugin-template
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1d88fba
commit aee39e8
Showing
4 changed files
with
542 additions
and
485 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,30 @@ | ||
from flask import Flask, request, render_template | ||
from flask import Flask, render_template, request | ||
|
||
import Func | ||
|
||
func = Func.CSGO() | ||
app = Flask(__name__) | ||
|
||
|
||
@app.route('/', methods=["GET"]) | ||
@app.route("/", methods=["GET"]) | ||
def index(): | ||
print(request.headers.get('User-Agent')) | ||
return render_template('./index.html', flag=1) | ||
print(request.headers.get("User-Agent")) | ||
return render_template("./index.html", flag=1) | ||
|
||
|
||
@app.route("/<string:short_code>", methods=['GET']) | ||
@app.route("/<string:short_code>", methods=["GET"]) | ||
def deal_url(short_code): | ||
QQ = func.Chk_API(short_code) | ||
if QQ: | ||
return render_template('./list.html', Code=short_code, QQ=QQ) | ||
else: | ||
return render_template('./index.html', flag=0) | ||
QQ = func.Chk_API(short_code) | ||
if QQ: | ||
return render_template("./list.html", Code=short_code, QQ=QQ) | ||
else: | ||
return render_template("./index.html", flag=0) | ||
|
||
|
||
@app.route("/db/<string:short_code>", methods=['GET']) | ||
@app.route("/db/<string:short_code>", methods=["GET"]) | ||
def get_data(short_code): | ||
return func.Get_data(short_code) | ||
return func.Get_data(short_code) | ||
|
||
|
||
if __name__ == '__main__': | ||
app.run(debug=False, port=7355, threaded=True) | ||
if __name__ == "__main__": | ||
app.run(debug=False, port=7355, threaded=True) |
Oops, something went wrong.