From 3242c7f7cb181013a3f5c59c855cc6277a115fd7 Mon Sep 17 00:00:00 2001 From: Subhamoy Biswas Date: Tue, 21 Jan 2025 19:45:38 +0530 Subject: [PATCH] (feat): added shorts support --- pytubepp/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pytubepp/utils.py b/pytubepp/utils.py index a5d4105..7ee8131 100644 --- a/pytubepp/utils.py +++ b/pytubepp/utils.py @@ -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):