From cbacef87d03902ccb9fa1d70e685e1227d9c8b87 Mon Sep 17 00:00:00 2001 From: rimu <3310831+rimu@users.noreply.github.com> Date: Mon, 9 Sep 2024 20:20:58 +1200 Subject: [PATCH] just to be sure --- app/utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/utils.py b/app/utils.py index cf25fcc1..1614df9e 100644 --- a/app/utils.py +++ b/app/utils.py @@ -210,6 +210,8 @@ def is_video_url(url: str) -> bool: def is_video_hosting_site(url: str) -> bool: + if url is None or url == '': + return False video_hosting_sites = ['https://youtube.com', 'https://www.youtube.com', 'https://youtu.be', 'https://www.vimeo.com', 'https://www.redgifs.com/watch/'] for starts_with in video_hosting_sites: if url.startswith(starts_with):