diff --git a/misskaty/plugins/scrapwebsite.py b/misskaty/plugins/scrapwebsite.py index 1c6053c5..d5a37f59 100644 --- a/misskaty/plugins/scrapwebsite.py +++ b/misskaty/plugins/scrapwebsite.py @@ -661,7 +661,7 @@ async def terbit21_scrap(_, msg): msgs += f"{c}. {i['judul']}\nCategory: {i['kategori']}\n" msgs += ( f"💠 Download\n\n" - if "Complete" or "Ongoing" not in i["kategori"] + if not re.search(r"Complete|Ongoing", i["kategori"]) else "" ) if len(head.encode("utf-8") + msgs.encode("utf-8")) >= 4000: @@ -717,7 +717,7 @@ async def terbit21_scrap(_, msg): msgs += f"{c}. {i['judul']}\nCategory: {i['kategori']}\n" msgs += ( f"💠 Download\n\n" - if "Complete" or "Ongoing" not in i["kategori"] + if not re.search(r"Complete|Ongoing", i["kategori"]) else "" ) if len(head.encode("utf-8") + msgs.encode("utf-8")) >= 4000: @@ -781,7 +781,7 @@ async def lk21_scrap(_, msg): msgs += f"{c}. {i['judul']}\nCategory: {i['kategori']}\n" msgs += ( f"💠 Download\n\n" - if "Complete" or "Ongoing" not in i["kategori"] + if not re.search(r"Complete|Ongoing", i["kategori"]) else "" ) if len(head.encode("utf-8") + msgs.encode("utf-8")) >= 4000: @@ -840,7 +840,7 @@ async def lk21_scrap(_, msg): msgs += f"{c}. {i['judul']}\nCategory: {i['kategori']}\n" msgs += ( f"💠 Download\n\n" - if "Complete" or "Ongoing" not in i["kategori"] + if not re.search(r"Complete|Ongoing", i["kategori"]) else "" ) if len(head.encode("utf-8") + msgs.encode("utf-8")) >= 4000: