Extract url

This commit is contained in:
Gabriel Augendre 2016-09-17 00:12:32 +02:00
parent ac9f137e8f
commit 60f6e6b339

12
app.py
View file

@ -8,8 +8,11 @@ app = Flask(__name__)
@app.route("/") @app.route("/")
def hello(): def hello():
cal_str = urllib.request.urlopen( url = os.environ.get('URL', None)
"***REMOVED***").read() if url is None:
return ""
cal_str = urllib.request.urlopen(url).read()
FILTERED_EVENTS = [ FILTERED_EVENTS = [
'MGL', 'MGL',
@ -18,8 +21,9 @@ def hello():
'COM', 'COM',
'RSM', 'RSM',
'ANG1', 'ANG1',
'DLG', 'DLG1',
'SPO', 'SPO1',
'SPO2',
'STA1', 'STA1',
'PST', 'PST',
'SEC', 'SEC',