[cleanup, ie] Match both http and https in _VALID_URL (#8968)

Except for Vimeo, since that causes matching collisions.

Authored by: seproDev
This commit is contained in:
sepro 2024-02-01 19:38:42 +01:00 committed by pukkandan
parent 93240fc184
commit a687226b48
No known key found for this signature in database
GPG key ID: 7EEE9E1E817D0A39
20 changed files with 28 additions and 28 deletions

View file

@ -3,7 +3,7 @@
class BeatBumpVideoIE(InfoExtractor): class 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 = [{ _TESTS = [{
'url': 'https://beatbump.ml/listen?id=MgNrAu2pzNs', 'url': 'https://beatbump.ml/listen?id=MgNrAu2pzNs',
'md5': '5ff3fff41d3935b9810a9731e485fe66', 'md5': '5ff3fff41d3935b9810a9731e485fe66',
@ -48,7 +48,7 @@ def _real_extract(self, url):
class BeatBumpPlaylistIE(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 = [{ _TESTS = [{
'url': 'https://beatbump.ml/release?id=MPREb_gTAcphH99wE', 'url': 'https://beatbump.ml/release?id=MPREb_gTAcphH99wE',
'playlist_count': 50, 'playlist_count': 50,

View file

@ -2,7 +2,7 @@
class CableAVIE(InfoExtractor): class 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 = [{ _TESTS = [{
'url': 'https://cableav.tv/lS4iR9lWjN8/', 'url': 'https://cableav.tv/lS4iR9lWjN8/',
'md5': '7e3fe5e49d61c4233b7f5b0f69b15e18', 'md5': '7e3fe5e49d61c4233b7f5b0f69b15e18',

View file

@ -13,7 +13,7 @@
class CamFMShowIE(InfoExtractor): 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 = [{ _TESTS = [{
'playlist_mincount': 5, 'playlist_mincount': 5,
'url': 'https://camfm.co.uk/shows/soul-mining/', 'url': 'https://camfm.co.uk/shows/soul-mining/',
@ -42,7 +42,7 @@ def _real_extract(self, url):
class CamFMEpisodeIE(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 = [{ _TESTS = [{
'url': 'https://camfm.co.uk/player/43336', 'url': 'https://camfm.co.uk/player/43336',
'skip': 'Episode will expire - don\'t actually know when, but it will go eventually', 'skip': 'Episode will expire - don\'t actually know when, but it will go eventually',

View file

@ -13,7 +13,7 @@
class CineverseBaseIE(InfoExtractor): 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', 'cineverse.com',
'asiancrush.com', 'asiancrush.com',
'dovechannel.com', 'dovechannel.com',

View file

@ -110,7 +110,7 @@ def _real_extract(self, url):
class CybraryCourseIE(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 = [{ _TESTS = [{
'url': 'https://app.cybrary.it/browse/course/az-500-microsoft-azure-security-technologies', 'url': 'https://app.cybrary.it/browse/course/az-500-microsoft-azure-security-technologies',
'info_dict': { 'info_dict': {

View file

@ -13,7 +13,7 @@
class DuoplayIE(InfoExtractor): class 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 = [{ _TESTS = [{
'note': 'Siberi võmm S02E12', 'note': 'Siberi võmm S02E12',
'url': 'https://duoplay.ee/4312/siberi-vomm?ep=24', 'url': 'https://duoplay.ee/4312/siberi-vomm?ep=24',

View file

@ -19,7 +19,7 @@ def _call_api(self, path, video_id, resource, fatal=True):
class EggheadCourseIE(EggheadBaseIE): class EggheadCourseIE(EggheadBaseIE):
IE_DESC = 'egghead.io course' IE_DESC = 'egghead.io course'
IE_NAME = 'egghead: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 = [{ _TESTS = [{
'url': 'https://egghead.io/courses/professor-frisby-introduces-composable-functional-javascript', 'url': 'https://egghead.io/courses/professor-frisby-introduces-composable-functional-javascript',
'playlist_count': 29, 'playlist_count': 29,
@ -65,7 +65,7 @@ def _real_extract(self, url):
class EggheadLessonIE(EggheadBaseIE): class EggheadLessonIE(EggheadBaseIE):
IE_DESC = 'egghead.io lesson' IE_DESC = 'egghead.io lesson'
IE_NAME = 'egghead: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 = [{ _TESTS = [{
'url': 'https://egghead.io/lessons/javascript-linear-data-flow-with-container-style-types-box', 'url': 'https://egghead.io/lessons/javascript-linear-data-flow-with-container-style-types-box',
'info_dict': { 'info_dict': {

View file

@ -31,7 +31,7 @@ def _check_if_logged_in(self, webpage):
class ITProTVIE(ITProTVBaseIE): 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 = [{ _TESTS = [{
'url': 'https://app.itpro.tv/course/guided-tour/introductionitprotv', 'url': 'https://app.itpro.tv/course/guided-tour/introductionitprotv',
'md5': 'bca4a28c2667fd1a63052e71a94bb88c', 'md5': 'bca4a28c2667fd1a63052e71a94bb88c',

View file

@ -3,7 +3,7 @@
class KommunetvIE(InfoExtractor): class 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 = { _TEST = {
'url': 'https://oslo.kommunetv.no/archive/921', 'url': 'https://oslo.kommunetv.no/archive/921',
'md5': '5f102be308ee759be1e12b63d5da4bbc', 'md5': '5f102be308ee759be1e12b63d5da4bbc',

View file

@ -172,7 +172,7 @@ def _real_extract(self, url):
class LecturioCourseIE(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 = [{ _TESTS = [{
'url': 'https://app.lecturio.com/medical-courses/microbiology-introduction.course#/', 'url': 'https://app.lecturio.com/medical-courses/microbiology-introduction.course#/',
'info_dict': { 'info_dict': {
@ -209,7 +209,7 @@ def _real_extract(self, url):
class LecturioDeCourseIE(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 = { _TEST = {
'url': 'https://www.lecturio.de/jura/grundrechte.kurs', 'url': 'https://www.lecturio.de/jura/grundrechte.kurs',
'only_matching': True, 'only_matching': True,

View file

@ -5,7 +5,7 @@
class MegaphoneIE(InfoExtractor): class MegaphoneIE(InfoExtractor):
IE_NAME = 'megaphone.fm' IE_NAME = 'megaphone.fm'
IE_DESC = 'megaphone.fm embedded players' 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})'] _EMBED_REGEX = [rf'<iframe[^>]*?\ssrc=["\'](?P<url>{_VALID_URL})']
_TEST = { _TEST = {
'url': 'https://player.megaphone.fm/GLT9749789991', 'url': 'https://player.megaphone.fm/GLT9749789991',

View file

@ -16,7 +16,7 @@
class MonstercatIE(InfoExtractor): 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 = [{ _TESTS = [{
'url': 'https://www.monstercat.com/release/742779548009', 'url': 'https://www.monstercat.com/release/742779548009',
'playlist_count': 20, 'playlist_count': 20,

View file

@ -5,7 +5,7 @@
class NewsPicksIE(InfoExtractor): class 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 = [{ _TESTS = [{
'url': 'https://newspicks.com/movie-series/11?movieId=1813', 'url': 'https://newspicks.com/movie-series/11?movieId=1813',

View file

@ -3,7 +3,7 @@
class NovaPlayIE(InfoExtractor): class 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 = [ _TESTS = [
{ {
'url': 'https://play.nova.bg/video/ochakvaite/season-0/ochakvaite-2022-07-22-sybudi-se-sat/606627', 'url': 'https://play.nova.bg/video/ochakvaite/season-0/ochakvaite-2022-07-22-sybudi-se-sat/606627',

View file

@ -10,7 +10,7 @@
class NZOnScreenIE(InfoExtractor): class NZOnScreenIE(InfoExtractor):
_VALID_URL = r'^https://www\.nzonscreen\.com/title/(?P<id>[^/?#]+)' _VALID_URL = r'^https?://www\.nzonscreen\.com/title/(?P<id>[^/?#]+)'
_TESTS = [{ _TESTS = [{
'url': 'https://www.nzonscreen.com/title/shoop-shoop-diddy-wop-cumma-cumma-wang-dang-1982', 'url': 'https://www.nzonscreen.com/title/shoop-shoop-diddy-wop-cumma-cumma-wang-dang-1982',
'info_dict': { 'info_dict': {

View file

@ -14,7 +14,7 @@
class ParlerIE(InfoExtractor): class ParlerIE(InfoExtractor):
IE_DESC = 'Posts on parler.com' 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 = [ _TESTS = [
{ {
'url': 'https://parler.com/feed/df79fdba-07cc-48fe-b085-3293897520d7', 'url': 'https://parler.com/feed/df79fdba-07cc-48fe-b085-3293897520d7',

View file

@ -5,7 +5,7 @@
class RbgTumIE(InfoExtractor): class 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 = [{ _TESTS = [{
# Combined view # Combined view
'url': 'https://live.rbg.tum.de/w/cpp/22128', 'url': 'https://live.rbg.tum.de/w/cpp/22128',
@ -60,7 +60,7 @@ def _real_extract(self, url):
class RbgTumCourseIE(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 = [{ _TESTS = [{
'url': 'https://live.rbg.tum.de/old/course/2022/S/fpv', 'url': 'https://live.rbg.tum.de/old/course/2022/S/fpv',
'info_dict': { 'info_dict': {
@ -105,7 +105,7 @@ def _real_extract(self, url):
class RbgTumNewCourseIE(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 = [{ _TESTS = [{
'url': 'https://live.rbg.tum.de/?year=2022&term=S&slug=fpv&view=3', 'url': 'https://live.rbg.tum.de/?year=2022&term=S&slug=fpv&view=3',
'info_dict': { 'info_dict': {

View file

@ -28,7 +28,7 @@ def _call_api(self, url, video_id, note=None):
class RCTIPlusIE(RCTIPlusBaseIE): 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 = [{ _TESTS = [{
'url': 'https://www.rctiplus.com/programs/1259/kiko-untuk-lola/episode/22124/untuk-lola', 'url': 'https://www.rctiplus.com/programs/1259/kiko-untuk-lola/episode/22124/untuk-lola',
'md5': '56ed45affad45fa18d5592a1bc199997', 'md5': '56ed45affad45fa18d5592a1bc199997',
@ -218,7 +218,7 @@ def _real_extract(self, url):
class RCTIPlusSeriesIE(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 = [{ _TESTS = [{
'url': 'https://www.rctiplus.com/programs/829/putri-untuk-pangeran', 'url': 'https://www.rctiplus.com/programs/829/putri-untuk-pangeran',
'playlist_mincount': 1019, 'playlist_mincount': 1019,
@ -336,7 +336,7 @@ def _real_extract(self, url):
class RCTIPlusTVIE(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 = [{ _TESTS = [{
'url': 'https://www.rctiplus.com/tv/rcti', 'url': 'https://www.rctiplus.com/tv/rcti',
'info_dict': { 'info_dict': {

View file

@ -83,7 +83,7 @@ def _real_extract(self, url):
class TeleQuebecSquatIE(InfoExtractor): 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 = [{ _TESTS = [{
'url': 'https://squat.telequebec.tv/videos/9314', 'url': 'https://squat.telequebec.tv/videos/9314',
'info_dict': { 'info_dict': {

View file

@ -224,7 +224,7 @@ def _real_extract(self, url):
class ViceArticleIE(ViceBaseIE): class ViceArticleIE(ViceBaseIE):
IE_NAME = 'vice:article' 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 = [{ _TESTS = [{
'url': 'https://www.vice.com/en_us/article/on-set-with-the-woman-making-mormon-porn-in-utah', 'url': 'https://www.vice.com/en_us/article/on-set-with-the-woman-making-mormon-porn-in-utah',