From 8b395066895afdcb3184c1558c1654a02effca2a Mon Sep 17 00:00:00 2001 From: Sarah Date: Sat, 10 Dec 2022 09:11:01 +0000 Subject: [PATCH] fix bug --- wiki_pages/FilmsByReference.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wiki_pages/FilmsByReference.py b/wiki_pages/FilmsByReference.py index 6d554c4..80987a3 100644 --- a/wiki_pages/FilmsByReference.py +++ b/wiki_pages/FilmsByReference.py @@ -49,8 +49,11 @@ def get_films_by_reference(viewings): page_url = VCinemaUtils.generate_wikipedia_url(page_title) if page_title in films_by_reference.keys(): - films_by_reference[page_title]["films"].append(viewing) films_by_reference[page_title]["keywords"].append(keyword) + + if viewing not in films_by_reference[page_title]["films"]: + films_by_reference[page_title]["films"].append(viewing) + else: films_by_reference[page_title] = {"url": page_url, "keywords": [keyword],