From 268baec48d81eabd0bbb22a813534cb06ab7f772 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?tr=C3=A9meur?= Date: Thu, 14 Jul 2022 19:36:26 +0100 Subject: [PATCH] Widen FFA net --- promptscrape.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/promptscrape.py b/promptscrape.py index 8aec5a6..9ab376b 100644 --- a/promptscrape.py +++ b/promptscrape.py @@ -152,7 +152,7 @@ while i < 8: ffaresoup = BeautifulSoup(str(ffaprompttext), "html.parser") ffatheprompt = ffaresoup.find_all("h4",text=True) for each in ffatheprompt: - if "100 words of" in (str(each.get_text())): + if "100 words of" in (str(each.get_text())) or "100 Words of" in (str(each.get_text())) or "100 Words Of" in (str(each.get_text())): if "Re:" not in (str(each.get_text())): ffacent.append(str(each.get_text())) i += 1 @@ -161,10 +161,11 @@ if ffacent: ffacentnew = [] for x in ffacent: x = x[13:] - ffacentnew.append(x) - ffaformat = "; ".join(ffacentnew) - print("fail-fandomanon (any): \033[1m" + ffaformat + "\033[0m (" + ffaprompt + ")\n") - thefile.write("- [[" + ffaprompt + "][fail-fandomanon]] (any): *" + ffaformat + "*\n") + if x != "": + ffacentnew.append(x) + ffaformat = "; ".join(ffacentnew) + print("fail-fandomanon (any): \033[1m" + ffaformat.lower() + "\033[0m (" + ffaprompt + ")\n") + thefile.write("- [[" + ffaprompt + "][fail-fandomanon]] (any): *" + ffaformat.lower() + "*\n") # for this one, prompts are unavailable on tuesdays and wednesdays