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