summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
Diffstat (limited to 'components')
-rw-r--r--components/extractor/check_url.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/components/extractor/check_url.py b/components/extractor/check_url.py
index b574b22..13d7259 100644
--- a/components/extractor/check_url.py
+++ b/components/extractor/check_url.py
@@ -11,7 +11,10 @@ def is_video(url: str) -> bool:
if not is_youtube(url):
return False
parsed_url = urlparse(url)
- if parsed_url.path in ('/watch', '/shorts/', '/embed/'):
+ for path in ('/shorts/', '/embed/'):
+ if parsed_url.path.startswith(path):
+ return True
+ if parsed_url.path == '/watch' and 'v' in parse_qs(parsed_url.query):
return True
return parsed_url.netloc == 'youtu.be'