From f1ba8a640cd23e342abdcf005e98b652e46ec724 Mon Sep 17 00:00:00 2001 From: nubber7 Date: Sat, 28 Dec 2019 23:58:38 -0800 Subject: [PATCH 1/2] unkno and piglatinize mashup --- main.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index bc096fb..c93304d 100644 --- a/main.py +++ b/main.py @@ -17,9 +17,15 @@ def get_fact(): return facts[0].getText() +data = {'input_text': get_fact()} + @app.route('/') def home(): - return "FILL ME!" + response = requests.post( + "https://hidden-journey-62459.herokuapp.com/piglatinize/", data, allow_redirects=False) + page_headers = response.headers + pig_url = page_headers['Location'] + return pig_url if __name__ == "__main__": From 01fdd1dd4c2bd2afdaa76dd19ad58de223cb3891 Mon Sep 17 00:00:00 2001 From: Gunturu Date: Sun, 29 Dec 2019 00:13:14 -0800 Subject: [PATCH 2/2] unkno pig mashup update to take data --- main.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/main.py b/main.py index c93304d..1d3b66a 100644 --- a/main.py +++ b/main.py @@ -16,11 +16,9 @@ def get_fact(): return facts[0].getText() - -data = {'input_text': get_fact()} - @app.route('/') def home(): + data = {'input_text': get_fact()} response = requests.post( "https://hidden-journey-62459.herokuapp.com/piglatinize/", data, allow_redirects=False) page_headers = response.headers