remove character rfom end of keyword

This commit is contained in:
Sarah 2022-12-16 19:11:25 +00:00
parent 41860df682
commit 26fab46176
1 changed files with 3 additions and 0 deletions

View File

@ -26,6 +26,9 @@ def get_films_by_reference(viewings):
if keyword.startswith("a-"): if keyword.startswith("a-"):
keyword = keyword[2:] keyword = keyword[2:]
if keyword.endswith("-character"):
keyword = keyword[:-10]
referenced = keyword.replace("-", " ") referenced = keyword.replace("-", " ")
try: try: