-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserver.py
More file actions
30 lines (26 loc) · 766 Bytes
/
server.py
File metadata and controls
30 lines (26 loc) · 766 Bytes
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
from flask import Flask, request
from flask import render_template
import jinja2
import jinja2.ext
import logging
app = Flask(__name__)
log = logging.getLogger('werkzeug')
log.disabled = True
@app.route("/loadpage/")
def loadpage():
url = request.args.get('url')
print(url)
year = request.args.get('year')
print(year)
month = request.args.get('month')
print(month)
day = request.args.get('day')
print(day)
url = "https://web.archive.org/web/" + str(year) + str(month) + str(day) + "043326if_/" + url
print(url)
return render_template("loadpage.html", url=url)
@app.route("/home")
def home():
return render_template("home.html")
if __name__ == "__main__":
app.run(debug=False)