From 54c4c8aa157c3107fae6929876d76f3791c58cbc Mon Sep 17 00:00:00 2001 From: Sarah Date: Mon, 18 Apr 2022 23:04:11 +0100 Subject: [PATCH] Update ViewingsCsv.py --- wiki_pages/ViewingsCsv.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wiki_pages/ViewingsCsv.py b/wiki_pages/ViewingsCsv.py index 90e81bc..13aaedb 100644 --- a/wiki_pages/ViewingsCsv.py +++ b/wiki_pages/ViewingsCsv.py @@ -10,7 +10,7 @@ PAGE_ID = 11 def update_viewings_csv(token_id, token_secret, check_existing=True): print("Retrieving viewings page") - html_page = Bookstack.get_page_html(VCinemaUtils.JACKNET_WIKI_URL, token_id, token_secret, CSV_PAGE_ID) + html_page = Bookstack.get_page_html(VCinemaUtils.JACKNET_WIKI_URL, token_id, token_secret, PAGE_ID) soup = BeautifulSoup(html_page, 'html.parser') csv_data = soup.find("code").text.strip().encode('utf-8') @@ -25,7 +25,7 @@ def update_viewings_csv(token_id, token_secret, check_existing=True): if not check_existing or page_hash != existing_attachment_hash: print("Updating file") # bookstack update file via api doesn't work - Bookstack.post_attachment(VCinemaUtils.JACKNET_WIKI_URL, token_id, token_secret, "vcinema.csv", csv_data, CSV_PAGE_ID) + Bookstack.post_attachment(VCinemaUtils.JACKNET_WIKI_URL, token_id, token_secret, "vcinema.csv", csv_data, PAGE_ID) Bookstack.delete_attachment(VCinemaUtils.JACKNET_WIKI_URL, token_id, token_secret, existing_attachment_id) print("File updated") else: