From 61550376b594883098e2198870eae8126a444c61 Mon Sep 17 00:00:00 2001 From: "Diccion, Kaeren C (UG - Computer Science)" <kd00450@surrey.ac.uk> Date: Fri, 12 Mar 2021 14:06:34 +0000 Subject: [PATCH] Update showtimes.py --- showtimes.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/showtimes.py b/showtimes.py index f383502..3b2df98 100644 --- a/showtimes.py +++ b/showtimes.py @@ -32,7 +32,11 @@ def showtimes_record(date): if date not in showtimes: raise NotFound print(showtimes[date]) - return json.dumps(showtimes[date]) + result = [] + for movie_id in showtimes[date]: + req = requests.get(movies_service.format(movie_id)) + result.append(req.json()["Title"]) + return json.dumps(result) if __name__ == "__main__": app.run(port=5002, debug=True) -- GitLab