From 1f13c2e878a9147467537f211bdac5377f0364f2 Mon Sep 17 00:00:00 2001 From: Sarah Date: Fri, 9 Sep 2022 21:31:55 +0100 Subject: [PATCH] Create update_viewings_csv.py --- update_viewings_csv.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 update_viewings_csv.py diff --git a/update_viewings_csv.py b/update_viewings_csv.py new file mode 100644 index 0000000..36c2d80 --- /dev/null +++ b/update_viewings_csv.py @@ -0,0 +1,16 @@ +import json + +from wiki_pages import ViewingsCsv + + +def update_viewings_csv(token_id, token_secret): + print("Updating CSV") + ViewingsCsv.update_viewings_csv(token_id, token_secret) + print("Done!") + + +if __name__ == '__main__': + with open('token.json') as json_file: + token = json.load(json_file) + + update_viewings_csv(token['token_id'], token['token_secret'])