Removed trailing whitespaces from exclusion words

This commit is contained in:
Joan Cano
2023-03-19 23:11:50 +01:00
parent 0fd3c6b334
commit 8dad58f882

View File

@@ -146,7 +146,7 @@ class Worker:
if len(excluded_words) > 0: if len(excluded_words) > 0:
for word in excluded_words.split(","): for word in excluded_words.split(","):
logging.info("EXCLUDER: Checking '" + word + "' for title: '" + title) logging.info("EXCLUDER: Checking '" + word + "' for title: '" + title)
if word.lower() in title.lower() or word.lower() in description.lower(): if word.lower().lstrip().rstrip() in title.lower() or word.lower().lstrip().rstrip() in description.lower():
logging.info("EXCLUDE!") logging.info("EXCLUDE!")
return True return True
return False return False
@@ -155,7 +155,7 @@ class Worker:
if len(excluded_words) > 0: if len(excluded_words) > 0:
for word in excluded_words.split(","): for word in excluded_words.split(","):
logging.info("Checking '" + word + "' for title: '" + title) logging.info("Checking '" + word + "' for title: '" + title)
if word.lower() in title.lower(): if word.lower().lstrip().rstrip() in title.lower():
return True return True
return False return False