From 26fab4617667a02487c6d7e8163f8cfd932aea4a Mon Sep 17 00:00:00 2001 From: Sarah Date: Fri, 16 Dec 2022 19:11:25 +0000 Subject: [PATCH] remove character rfom end of keyword --- wiki_pages/FilmsByReference.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wiki_pages/FilmsByReference.py b/wiki_pages/FilmsByReference.py index ae9634e..e6d4da7 100644 --- a/wiki_pages/FilmsByReference.py +++ b/wiki_pages/FilmsByReference.py @@ -26,6 +26,9 @@ def get_films_by_reference(viewings): if keyword.startswith("a-"): keyword = keyword[2:] + if keyword.endswith("-character"): + keyword = keyword[:-10] + referenced = keyword.replace("-", " ") try: