-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.py
More file actions
49 lines (36 loc) · 1.02 KB
/
app.py
File metadata and controls
49 lines (36 loc) · 1.02 KB
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
from flask import Flask
from flask import request
from fulltextURL import *
from searchGuide import *
from searchAZ import *
app = Flask(__name__)
@app.route("/")
def usageDetails():
return "Please visit https://github.com/RonBulaon/download-now usage instructions!"
@app.route("/geturl")
def getURL():
title = request.args.get('title')
author = request.args.get('author')
if title and author:
data = resolveURL(title,author)
return data
else:
return {'error':'missing values'}
@app.route("/searchguide")
def searchGuide():
keywords = request.args.get('keywords')
if keywords:
data = checkGuide(keywords)
return data
else:
return {'error':'missing values'}
@app.route("/searchaz")
def searchAZ():
keywords = request.args.get('keywords')
if keywords:
data = checkAZ(keywords)
return data
else:
return {'error':'missing values'}
# if __name__ == "__main__":
# app.run(host="0.0.0.0", port=80, debug=True)