diff --git a/newbot.py b/newbot.py index 0ebf467..045cb08 100644 --- a/newbot.py +++ b/newbot.py @@ -184,7 +184,7 @@ def video_check(info, *, incomplete): vid_details["channel"] = info.get("channel") print(info.get("channel")) print(info.get("title")) - banned_video = re.compile(os.getenv("BLOCK_REGEX",""), re.IGNORECASE).findall(f"{vid_details['title']} {vid_details['channel']}") + banned_video = re.compile((os.getenv("BLOCK_REGEX","^\b$") if os.getenv("BLOCK_REGEX","^\b$") != "" else "^\b$"), re.IGNORECASE).findall(f"{vid_details['title']} {vid_details['channel']}") if (duration and duration >= ((float(os.getenv("MAX_MIN")) * 60) + 480)) or banned_video: return "video too long" #TODO why is this an issue if its the second video played