youtube with and without the www

This commit is contained in:
rimu 2024-09-09 09:04:05 +12:00
parent 1ef01d12ab
commit 3cb3a1b80d

View file

@ -210,7 +210,7 @@ def is_video_url(url: str) -> bool:
def is_video_hosting_site(url: str) -> bool: def is_video_hosting_site(url: str) -> bool:
video_hosting_sites = ['https://www.youtube.com', 'https://youtu.be', 'https://www.vimeo.com', 'https://www.redgifs.com/watch/'] 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: for starts_with in video_hosting_sites:
if url.startswith(starts_with): if url.startswith(starts_with):
return True return True