A feature-rich command-line audio/video downloader
[cleanup, ie] Match both `http` and `https` in `_VALID_URL` (#8968)
seproa687226b48f7
diff --git a/yt_dlp/extractor/beatbump.py b/yt_dlp/extractor/beatbump.pyindex f48566b2d5..777a1b3268 100644--- a/yt_dlp/extractor/beatbump.py+++ b/yt_dlp/extractor/beatbump.py@@ -3,7 +3,7 @@ from .youtube import YoutubeIE, YoutubeTabIEclass BeatBumpVideoIE(InfoExtractor):- _VALID_URL = r'https://beatbump\.(?:ml|io)/listen\?id=(?P<id>[\w-]+)'+ _VALID_URL = r'https?://beatbump\.(?:ml|io)/listen\?id=(?P<id>[\w-]+)'_TESTS = [{'url': 'https://beatbump.ml/listen?id=MgNrAu2pzNs','md5': '5ff3fff41d3935b9810a9731e485fe66',@@ -48,7 +48,7 @@ class BeatBumpVideoIE(InfoExtractor):class BeatBumpPlaylistIE(InfoExtractor):- _VALID_URL = r'https://beatbump\.(?:ml|io)/(?:release\?id=|artist/|playlist/)(?P<id>[\w-]+)'+ _VALID_URL = r'https?://beatbump\.(?:ml|io)/(?:release\?id=|artist/|playlist/)(?P<id>[\w-]+)'_TESTS = [{'url': 'https://beatbump.ml/release?id=MPREb_gTAcphH99wE','playlist_count': 50,diff --git a/yt_dlp/extractor/cableav.py b/yt_dlp/extractor/cableav.pyindex 2e374e5eba..4a221414ea 100644--- a/yt_dlp/extractor/cableav.py+++ b/yt_dlp/extractor/cableav.py@@ -2,7 +2,7 @@ from .common import InfoExtractorclass CableAVIE(InfoExtractor):- _VALID_URL = r'https://cableav\.tv/(?P<id>[a-zA-Z0-9]+)'+ _VALID_URL = r'https?://cableav\.tv/(?P<id>[a-zA-Z0-9]+)'_TESTS = [{'url': 'https://cableav.tv/lS4iR9lWjN8/','md5': '7e3fe5e49d61c4233b7f5b0f69b15e18',diff --git a/yt_dlp/extractor/camfm.py b/yt_dlp/extractor/camfm.pyindex a9850f46e0..11dafa4a21 100644--- a/yt_dlp/extractor/camfm.py+++ b/yt_dlp/extractor/camfm.py@@ -13,7 +13,7 @@ from ..utils import (class CamFMShowIE(InfoExtractor):- _VALID_URL = r'https://(?:www\.)?camfm\.co\.uk/shows/(?P<id>[^/]+)'+ _VALID_URL = r'https?://(?:www\.)?camfm\.co\.uk/shows/(?P<id>[^/]+)'_TESTS = [{'playlist_mincount': 5,'url': 'https://camfm.co.uk/shows/soul-mining/',@@ -42,7 +42,7 @@ class CamFMShowIE(InfoExtractor):class CamFMEpisodeIE(InfoExtractor):- _VALID_URL = r'https://(?:www\.)?camfm\.co\.uk/player/(?P<id>[^/]+)'+ _VALID_URL = r'https?://(?:www\.)?camfm\.co\.uk/player/(?P<id>[^/]+)'_TESTS = [{'url': 'https://camfm.co.uk/player/43336','skip': 'Episode will expire - don\'t actually know when, but it will go eventually',diff --git a/yt_dlp/extractor/cineverse.py b/yt_dlp/extractor/cineverse.pyindex 032c4334b1..4405297c62 100644--- a/yt_dlp/extractor/cineverse.py+++ b/yt_dlp/extractor/cineverse.py@@ -13,7 +13,7 @@ from ..utils import (class CineverseBaseIE(InfoExtractor):- _VALID_URL_BASE = r'https://www\.(?P<host>%s)' % '|'.join(map(re.escape, (+ _VALID_URL_BASE = r'https?://www\.(?P<host>%s)' % '|'.join(map(re.escape, ('cineverse.com','asiancrush.com','dovechannel.com',diff --git a/yt_dlp/extractor/cybrary.py b/yt_dlp/extractor/cybrary.pyindex 614d0cd9e7..c6995b25b6 100644--- a/yt_dlp/extractor/cybrary.py+++ b/yt_dlp/extractor/cybrary.py@@ -110,7 +110,7 @@ class CybraryIE(CybraryBaseIE):class CybraryCourseIE(CybraryBaseIE):- _VALID_URL = r'https://app\.cybrary\.it/browse/course/(?P<id>[\w-]+)/?(?:$|[#?])'+ _VALID_URL = r'https?://app\.cybrary\.it/browse/course/(?P<id>[\w-]+)/?(?:$|[#?])'_TESTS = [{'url': 'https://app.cybrary.it/browse/course/az-500-microsoft-azure-security-technologies','info_dict': {diff --git a/yt_dlp/extractor/duoplay.py b/yt_dlp/extractor/duoplay.pyindex ebce0b5f25..18642fea39 100644--- a/yt_dlp/extractor/duoplay.py+++ b/yt_dlp/extractor/duoplay.py@@ -13,7 +13,7 @@ from ..utils.traversal import traverse_objclass DuoplayIE(InfoExtractor):- _VALID_URL = r'https://duoplay\.ee/(?P<id>\d+)/[\w-]+/?(?:\?(?:[^#]+&)?ep=(?P<ep>\d+))?'+ _VALID_URL = r'https?://duoplay\.ee/(?P<id>\d+)/[\w-]+/?(?:\?(?:[^#]+&)?ep=(?P<ep>\d+))?'_TESTS = [{'note': 'Siberi võmm S02E12','url': 'https://duoplay.ee/4312/siberi-vomm?ep=24',diff --git a/yt_dlp/extractor/egghead.py b/yt_dlp/extractor/egghead.pyindex a4b2a12f68..c94f3f81f6 100644--- a/yt_dlp/extractor/egghead.py+++ b/yt_dlp/extractor/egghead.py@@ -19,7 +19,7 @@ class EggheadBaseIE(InfoExtractor):class EggheadCourseIE(EggheadBaseIE):IE_DESC = 'egghead.io course'IE_NAME = 'egghead:course'- _VALID_URL = r'https://(?:app\.)?egghead\.io/(?:course|playlist)s/(?P<id>[^/?#&]+)'+ _VALID_URL = r'https?://(?:app\.)?egghead\.io/(?:course|playlist)s/(?P<id>[^/?#&]+)'_TESTS = [{'url': 'https://egghead.io/courses/professor-frisby-introduces-composable-functional-javascript','playlist_count': 29,@@ -65,7 +65,7 @@ class EggheadCourseIE(EggheadBaseIE):class EggheadLessonIE(EggheadBaseIE):IE_DESC = 'egghead.io lesson'IE_NAME = 'egghead:lesson'- _VALID_URL = r'https://(?:app\.)?egghead\.io/(?:api/v1/)?lessons/(?P<id>[^/?#&]+)'+ _VALID_URL = r'https?://(?:app\.)?egghead\.io/(?:api/v1/)?lessons/(?P<id>[^/?#&]+)'_TESTS = [{'url': 'https://egghead.io/lessons/javascript-linear-data-flow-with-container-style-types-box','info_dict': {diff --git a/yt_dlp/extractor/itprotv.py b/yt_dlp/extractor/itprotv.pyindex b9d5c196d0..713fd4ec5b 100644--- a/yt_dlp/extractor/itprotv.py+++ b/yt_dlp/extractor/itprotv.py@@ -31,7 +31,7 @@ class ITProTVBaseIE(InfoExtractor):class ITProTVIE(ITProTVBaseIE):- _VALID_URL = r'https://app\.itpro\.tv/course/(?P<course>[\w-]+)/(?P<id>[\w-]+)'+ _VALID_URL = r'https?://app\.itpro\.tv/course/(?P<course>[\w-]+)/(?P<id>[\w-]+)'_TESTS = [{'url': 'https://app.itpro.tv/course/guided-tour/introductionitprotv','md5': 'bca4a28c2667fd1a63052e71a94bb88c',diff --git a/yt_dlp/extractor/kommunetv.py b/yt_dlp/extractor/kommunetv.pyindex a30905b579..432816cd80 100644--- a/yt_dlp/extractor/kommunetv.py+++ b/yt_dlp/extractor/kommunetv.py@@ -3,7 +3,7 @@ from ..utils import update_urlclass KommunetvIE(InfoExtractor):- _VALID_URL = r'https://\w+\.kommunetv\.no/archive/(?P<id>\w+)'+ _VALID_URL = r'https?://\w+\.kommunetv\.no/archive/(?P<id>\w+)'_TEST = {'url': 'https://oslo.kommunetv.no/archive/921','md5': '5f102be308ee759be1e12b63d5da4bbc',diff --git a/yt_dlp/extractor/lecturio.py b/yt_dlp/extractor/lecturio.pyindex 795012541c..629d208fcc 100644--- a/yt_dlp/extractor/lecturio.py+++ b/yt_dlp/extractor/lecturio.py@@ -172,7 +172,7 @@ class LecturioIE(LecturioBaseIE):class LecturioCourseIE(LecturioBaseIE):- _VALID_URL = r'https://app\.lecturio\.com/(?:[^/]+/(?P<nt>[^/?#&]+)\.course|(?:#/)?course/c/(?P<id>\d+))'+ _VALID_URL = r'https?://app\.lecturio\.com/(?:[^/]+/(?P<nt>[^/?#&]+)\.course|(?:#/)?course/c/(?P<id>\d+))'_TESTS = [{'url': 'https://app.lecturio.com/medical-courses/microbiology-introduction.course#/','info_dict': {@@ -209,7 +209,7 @@ class LecturioCourseIE(LecturioBaseIE):class LecturioDeCourseIE(LecturioBaseIE):- _VALID_URL = r'https://(?:www\.)?lecturio\.de/[^/]+/(?P<id>[^/?#&]+)\.kurs'+ _VALID_URL = r'https?://(?:www\.)?lecturio\.de/[^/]+/(?P<id>[^/?#&]+)\.kurs'_TEST = {'url': 'https://www.lecturio.de/jura/grundrechte.kurs','only_matching': True,diff --git a/yt_dlp/extractor/megaphone.py b/yt_dlp/extractor/megaphone.pyindex eb790e6918..d249a8492d 100644--- a/yt_dlp/extractor/megaphone.py+++ b/yt_dlp/extractor/megaphone.py@@ -5,7 +5,7 @@ from ..utils import js_to_jsonclass MegaphoneIE(InfoExtractor):IE_NAME = 'megaphone.fm'IE_DESC = 'megaphone.fm embedded players'- _VALID_URL = r'https://player\.megaphone\.fm/(?P<id>[A-Z0-9]+)'+ _VALID_URL = r'https?://player\.megaphone\.fm/(?P<id>[A-Z0-9]+)'_EMBED_REGEX = [rf'<iframe[^>]*?\ssrc=["\'](?P<url>{_VALID_URL})']_TEST = {'url': 'https://player.megaphone.fm/GLT9749789991',diff --git a/yt_dlp/extractor/monstercat.py b/yt_dlp/extractor/monstercat.pyindex cf5e099691..a69a12e18c 100644--- a/yt_dlp/extractor/monstercat.py+++ b/yt_dlp/extractor/monstercat.py@@ -16,7 +16,7 @@ from ..utils import (class MonstercatIE(InfoExtractor):- _VALID_URL = r'https://www\.monstercat\.com/release/(?P<id>\d+)'+ _VALID_URL = r'https?://www\.monstercat\.com/release/(?P<id>\d+)'_TESTS = [{'url': 'https://www.monstercat.com/release/742779548009','playlist_count': 20,diff --git a/yt_dlp/extractor/newspicks.py b/yt_dlp/extractor/newspicks.pyindex b6334dcbaf..4a1cb0a735 100644--- a/yt_dlp/extractor/newspicks.py+++ b/yt_dlp/extractor/newspicks.py@@ -5,7 +5,7 @@ from ..utils import ExtractorErrorclass NewsPicksIE(InfoExtractor):- _VALID_URL = r'https://newspicks\.com/movie-series/(?P<channel_id>\d+)\?movieId=(?P<id>\d+)'+ _VALID_URL = r'https?://newspicks\.com/movie-series/(?P<channel_id>\d+)\?movieId=(?P<id>\d+)'_TESTS = [{'url': 'https://newspicks.com/movie-series/11?movieId=1813',diff --git a/yt_dlp/extractor/novaplay.py b/yt_dlp/extractor/novaplay.pyindex 77ae03fd0b..adab33f59e 100644--- a/yt_dlp/extractor/novaplay.py+++ b/yt_dlp/extractor/novaplay.py@@ -3,7 +3,7 @@ from ..utils import int_or_none, parse_duration, parse_iso8601class NovaPlayIE(InfoExtractor):- _VALID_URL = r'https://play\.nova\.bg/video/[^?#]+/(?P<id>\d+)'+ _VALID_URL = r'https?://play\.nova\.bg/video/[^?#]+/(?P<id>\d+)'_TESTS = [{'url': 'https://play.nova.bg/video/ochakvaite/season-0/ochakvaite-2022-07-22-sybudi-se-sat/606627',diff --git a/yt_dlp/extractor/nzonscreen.py b/yt_dlp/extractor/nzonscreen.pyindex 6926bc5b2f..bf2dbca59c 100644--- a/yt_dlp/extractor/nzonscreen.py+++ b/yt_dlp/extractor/nzonscreen.py@@ -10,7 +10,7 @@ from ..utils import (class NZOnScreenIE(InfoExtractor):- _VALID_URL = r'^https://www\.nzonscreen\.com/title/(?P<id>[^/?#]+)'+ _VALID_URL = r'^https?://www\.nzonscreen\.com/title/(?P<id>[^/?#]+)'_TESTS = [{'url': 'https://www.nzonscreen.com/title/shoop-shoop-diddy-wop-cumma-cumma-wang-dang-1982','info_dict': {diff --git a/yt_dlp/extractor/parler.py b/yt_dlp/extractor/parler.pyindex 2af805e7f3..563012f355 100644--- a/yt_dlp/extractor/parler.py+++ b/yt_dlp/extractor/parler.py@@ -14,7 +14,7 @@ from ..utils import (class ParlerIE(InfoExtractor):IE_DESC = 'Posts on parler.com'- _VALID_URL = r'https://parler\.com/feed/(?P<id>[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12})'+ _VALID_URL = r'https?://parler\.com/feed/(?P<id>[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12})'_TESTS = [{'url': 'https://parler.com/feed/df79fdba-07cc-48fe-b085-3293897520d7',diff --git a/yt_dlp/extractor/rbgtum.py b/yt_dlp/extractor/rbgtum.pyindex c8a331f3ee..54f194cbda 100644--- a/yt_dlp/extractor/rbgtum.py+++ b/yt_dlp/extractor/rbgtum.py@@ -5,7 +5,7 @@ from ..utils import parse_qs, remove_start, traverse_obj, ExtractorErrorclass RbgTumIE(InfoExtractor):- _VALID_URL = r'https://(?:live\.rbg\.tum\.de|tum\.live)/w/(?P<id>[^?#]+)'+ _VALID_URL = r'https?://(?:live\.rbg\.tum\.de|tum\.live)/w/(?P<id>[^?#]+)'_TESTS = [{# Combined view'url': 'https://live.rbg.tum.de/w/cpp/22128',@@ -60,7 +60,7 @@ class RbgTumIE(InfoExtractor):class RbgTumCourseIE(InfoExtractor):- _VALID_URL = r'https://(?P<hostname>(?:live\.rbg\.tum\.de|tum\.live))/old/course/(?P<id>(?P<year>\d+)/(?P<term>\w+)/(?P<slug>[^/?#]+))'+ _VALID_URL = r'https?://(?P<hostname>(?:live\.rbg\.tum\.de|tum\.live))/old/course/(?P<id>(?P<year>\d+)/(?P<term>\w+)/(?P<slug>[^/?#]+))'_TESTS = [{'url': 'https://live.rbg.tum.de/old/course/2022/S/fpv','info_dict': {@@ -105,7 +105,7 @@ class RbgTumCourseIE(InfoExtractor):class RbgTumNewCourseIE(InfoExtractor):- _VALID_URL = r'https://(?P<hostname>(?:live\.rbg\.tum\.de|tum\.live))/\?'+ _VALID_URL = r'https?://(?P<hostname>(?:live\.rbg\.tum\.de|tum\.live))/\?'_TESTS = [{'url': 'https://live.rbg.tum.de/?year=2022&term=S&slug=fpv&view=3','info_dict': {diff --git a/yt_dlp/extractor/rcti.py b/yt_dlp/extractor/rcti.pyindex 2f50efeda7..6a7c7f3991 100644--- a/yt_dlp/extractor/rcti.py+++ b/yt_dlp/extractor/rcti.py@@ -28,7 +28,7 @@ class RCTIPlusBaseIE(InfoExtractor):class RCTIPlusIE(RCTIPlusBaseIE):- _VALID_URL = r'https://www\.rctiplus\.com/(?:programs/\d+?/.*?/)?(?P<type>episode|clip|extra|live-event|missed-event)/(?P<id>\d+)/(?P<display_id>[^/?#&]+)'+ _VALID_URL = r'https?://www\.rctiplus\.com/(?:programs/\d+?/.*?/)?(?P<type>episode|clip|extra|live-event|missed-event)/(?P<id>\d+)/(?P<display_id>[^/?#&]+)'_TESTS = [{'url': 'https://www.rctiplus.com/programs/1259/kiko-untuk-lola/episode/22124/untuk-lola','md5': '56ed45affad45fa18d5592a1bc199997',@@ -218,7 +218,7 @@ class RCTIPlusIE(RCTIPlusBaseIE):class RCTIPlusSeriesIE(RCTIPlusBaseIE):- _VALID_URL = r'https://www\.rctiplus\.com/programs/(?P<id>\d+)/(?P<display_id>[^/?#&]+)(?:/(?P<type>episodes|extras|clips))?'+ _VALID_URL = r'https?://www\.rctiplus\.com/programs/(?P<id>\d+)/(?P<display_id>[^/?#&]+)(?:/(?P<type>episodes|extras|clips))?'_TESTS = [{'url': 'https://www.rctiplus.com/programs/829/putri-untuk-pangeran','playlist_mincount': 1019,@@ -336,7 +336,7 @@ class RCTIPlusSeriesIE(RCTIPlusBaseIE):class RCTIPlusTVIE(RCTIPlusBaseIE):- _VALID_URL = r'https://www\.rctiplus\.com/((tv/(?P<tvname>\w+))|(?P<eventname>live-event|missed-event))'+ _VALID_URL = r'https?://www\.rctiplus\.com/((tv/(?P<tvname>\w+))|(?P<eventname>live-event|missed-event))'_TESTS = [{'url': 'https://www.rctiplus.com/tv/rcti','info_dict': {diff --git a/yt_dlp/extractor/telequebec.py b/yt_dlp/extractor/telequebec.pyindex e89137269a..08a083714e 100644--- a/yt_dlp/extractor/telequebec.py+++ b/yt_dlp/extractor/telequebec.py@@ -83,7 +83,7 @@ class TeleQuebecIE(TeleQuebecBaseIE):class TeleQuebecSquatIE(InfoExtractor):- _VALID_URL = r'https://squat\.telequebec\.tv/videos/(?P<id>\d+)'+ _VALID_URL = r'https?://squat\.telequebec\.tv/videos/(?P<id>\d+)'_TESTS = [{'url': 'https://squat.telequebec.tv/videos/9314','info_dict': {diff --git a/yt_dlp/extractor/vice.py b/yt_dlp/extractor/vice.pyindex 1a2d667e70..d31908fb12 100644--- a/yt_dlp/extractor/vice.py+++ b/yt_dlp/extractor/vice.py@@ -224,7 +224,7 @@ class ViceShowIE(ViceBaseIE):class ViceArticleIE(ViceBaseIE):IE_NAME = 'vice:article'- _VALID_URL = r'https://(?:www\.)?vice\.com/(?P<locale>[^/]+)/article/(?:[0-9a-z]{6}/)?(?P<id>[^?#]+)'+ _VALID_URL = r'https?://(?:www\.)?vice\.com/(?P<locale>[^/]+)/article/(?:[0-9a-z]{6}/)?(?P<id>[^?#]+)'_TESTS = [{'url': 'https://www.vice.com/en_us/article/on-set-with-the-woman-making-mormon-porn-in-utah',