Update update_viewings_csv.py

This commit is contained in:
Sarah 2022-03-25 22:28:23 +00:00
parent 19cce48dab
commit 96ab1d213c

View File

@ -1,4 +1,3 @@
import argparse
from bs4 import BeautifulSoup
import hashlib
@ -31,14 +30,4 @@ def update_viewings_csv(token_id, token_secret, check_existing=True):
Bookstack.delete_attachment(VCinemaUtils.JACKNET_WIKI_URL, token_id, token_secret, existing_attachment_id)
print("File updated")
else:
print("File already up-to-date")
if __name__ == '__main__':
parser = argparse.ArgumentParser(description='Update the vcinema.csv file with data from the CSV wiki page.')
parser.add_argument('token_id', help='API token ID.')
parser.add_argument('token_secret', help='API token secret.')
args = parser.parse_args()
update_viewings_csv(args.token_id, args.token_secret)
print("File already up-to-date")