fix blacklist

This commit is contained in:
cynthia 2025-04-05 08:56:35 +00:00
parent fe6b826027
commit c6518363c1

View file

@ -115,8 +115,8 @@ def add_urls(urls):
html = BeautifulSoup(req.text, features="lxml") html = BeautifulSoup(req.text, features="lxml")
title = html.title.string if html.title is not None else "" title = html.title.string if html.title is not None else ""
if blacklist_file is not None: if blacklist_file is not None:
for word in blacklist_file.loc["blacklisted-words"]: for row in blacklist_file.itertuples():
if word in title: if row[1] in title:
print_colors('[+] Forbidden word found. Rejecting.') print_colors('[+] Forbidden word found. Rejecting.')
forbidden = True forbidden = True
if forbidden: if forbidden: