From 60f6e6b33928a38d3306f523ceffb55f5c5c098f Mon Sep 17 00:00:00 2001 From: Gabriel Augendre Date: Sat, 17 Sep 2016 00:12:32 +0200 Subject: [PATCH] Extract url --- app.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/app.py b/app.py index 00b1d04..2da1acf 100644 --- a/app.py +++ b/app.py @@ -8,8 +8,11 @@ app = Flask(__name__) @app.route("/") def hello(): - cal_str = urllib.request.urlopen( - "***REMOVED***").read() + url = os.environ.get('URL', None) + if url is None: + return "" + + cal_str = urllib.request.urlopen(url).read() FILTERED_EVENTS = [ 'MGL', @@ -18,8 +21,9 @@ def hello(): 'COM', 'RSM', 'ANG1', - 'DLG', - 'SPO', + 'DLG1', + 'SPO1', + 'SPO2', 'STA1', 'PST', 'SEC',