1
1
mirror of https://github.com/neosubhamoy/pytubepp.git synced 2025-12-19 07:43:02 +05:30

(feat): added shorts support

This commit is contained in:
2025-01-21 19:45:38 +05:30
parent e493c49e1c
commit 3242c7f7cb

View File

@@ -36,7 +36,7 @@ def get_version():
return "Unknown"
def is_valid_url(url):
match = re.search(r"(https?://(?:www\.|music\.)?youtube\.com/watch\?v=[^&]{11}|https?://youtu\.be/[^?&]*(\?si=[^&]*)?)", url)
match = re.search(r"(https?://(?:www\.|music\.)?youtube\.com/(?:watch\?v=[^&]{11}|shorts/[^?&]+)|https?://youtu\.be/[^?&]*(\?si=[^&]*)?)", url)
return match
def get_unique_filename(filename, directory=downloadDIR):