From d83f2f8dacb3d0ff362adfb4edfad338891de718 Mon Sep 17 00:00:00 2001 From: Sarah Date: Sat, 10 Dec 2022 07:59:05 +0000 Subject: [PATCH 1/2] fix link --- vcinema_utils/VCinemaUtils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vcinema_utils/VCinemaUtils.py b/vcinema_utils/VCinemaUtils.py index 7fbf576..114f44e 100644 --- a/vcinema_utils/VCinemaUtils.py +++ b/vcinema_utils/VCinemaUtils.py @@ -147,4 +147,4 @@ def generate_imdb_url(imdb_id): def generate_wikipedia_url(page_title): - "https://en.wikipedia.org/wiki/{}".format(page_title.replace(" ", "_")) + return "https://en.wikipedia.org/wiki/{}".format(page_title.replace(" ", "_")) From 46647ef4d748fa5a9983a860833749427d146639 Mon Sep 17 00:00:00 2001 From: Sarah Date: Sat, 10 Dec 2022 08:51:53 +0000 Subject: [PATCH 2/2] fix capitalization --- wiki_pages/FilmsByReference.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wiki_pages/FilmsByReference.py b/wiki_pages/FilmsByReference.py index 6d554c4..1c3504d 100644 --- a/wiki_pages/FilmsByReference.py +++ b/wiki_pages/FilmsByReference.py @@ -37,6 +37,7 @@ def get_films_by_reference(viewings): except wikipedia.DisambiguationError as e: page_title = e.title + page_title = page_title[0].upper() + page_title[1:] page_url = VCinemaUtils.generate_wikipedia_url(page_title) except wikipedia.PageError as _: try: @@ -46,6 +47,7 @@ def get_films_by_reference(viewings): page_url = referenced_page.url except wikipedia.DisambiguationError as e: page_title = e.title + page_title = page_title[0].upper() + page_title[1:] page_url = VCinemaUtils.generate_wikipedia_url(page_title) if page_title in films_by_reference.keys():