Spaces:
Configuration error
Configuration error
Update app.py
Browse files
app.py
CHANGED
@@ -1,23 +1,12 @@
|
|
1 |
# app.py
|
2 |
|
3 |
-
from flask import Flask, render_template
|
4 |
-
from scanner import get_site_info
|
5 |
|
6 |
app = Flask(__name__)
|
7 |
|
8 |
-
@app.route(
|
9 |
-
def
|
10 |
-
|
11 |
-
error = None
|
12 |
-
if request.method == 'POST':
|
13 |
-
url = request.form['url']
|
14 |
-
if not url.startswith('http'):
|
15 |
-
url = 'https://' + url
|
16 |
-
result = get_site_info(url)
|
17 |
-
if result.get("error"):
|
18 |
-
error = result["error"]
|
19 |
-
result = None
|
20 |
-
return render_template('index.html', result=result, error=error)
|
21 |
|
22 |
-
if __name__ ==
|
23 |
app.run(debug=True)
|
|
|
1 |
# app.py
|
2 |
|
3 |
+
from flask import Flask, render_template
|
|
|
4 |
|
5 |
app = Flask(__name__)
|
6 |
|
7 |
+
@app.route("/")
|
8 |
+
def home():
|
9 |
+
return render_template("index.html")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
|
11 |
+
if __name__ == "__main__":
|
12 |
app.run(debug=True)
|