1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-08-16 09:28:28 +00:00

MainStreamingIE

This commit is contained in:
doe1080 2025-07-17 00:53:50 +09:00
parent fa0734924f
commit 5dc17356d2
2 changed files with 96 additions and 99 deletions

View File

@ -930,21 +930,6 @@ class GenericIE(InfoExtractor):
'thumbnail': 'https://assets.libsyn.com/secure/item/3793998/?height=90&width=90', 'thumbnail': 'https://assets.libsyn.com/secure/item/3793998/?height=90&width=90',
'upload_date': '20141126', 'upload_date': '20141126',
}, },
}, {
# 🔧81
# MainStreamingIE
'url': 'https://www.lacplay.it/video/in-evidenza_728/lac-storie-p-250-i-santi-pietro-e-paolo_77297/',
'info_dict': {
'id': 'u7kiX5DUaHYr',
'ext': 'mp4',
'title': 'I Santi Pietro e Paolo',
'description': 'md5:ff6be24916ba6b9ae990bf5f3df4911e',
'duration': 1700.0,
'thumbnail': r're:https?://.+',
'tags': '06/07/2025',
'live_status': 'not_live',
},
'skip': 'IE fix required; embed detection',
}, { }, {
# ✅124 # ✅124
# YoutubeIE # YoutubeIE

View File

@ -16,8 +16,7 @@ class MainStreamingIE(InfoExtractor):
_EMBED_REGEX = [rf'<iframe[^>]+?src=["\']?(?P<url>{_VALID_URL})["\']?'] _EMBED_REGEX = [rf'<iframe[^>]+?src=["\']?(?P<url>{_VALID_URL})["\']?']
IE_DESC = 'MainStreaming Player' IE_DESC = 'MainStreaming Player'
_TESTS = [ _TESTS = [{
{
# Live stream offline, has alternative content id # Live stream offline, has alternative content id
'url': 'https://webtools-e18da6642b684f8aa9ae449862783a56.msvdn.net/embed/53EN6GxbWaJC', 'url': 'https://webtools-e18da6642b684f8aa9ae449862783a56.msvdn.net/embed/53EN6GxbWaJC',
'info_dict': { 'info_dict': {
@ -26,7 +25,7 @@ class MainStreamingIE(InfoExtractor):
'description': '', 'description': '',
'live_status': 'was_live', 'live_status': 'was_live',
'ext': 'mp4', 'ext': 'mp4',
'thumbnail': r're:https?://[A-Za-z0-9-]*\.msvdn.net/image/\w+/poster', 'thumbnail': r're:https?://[\w-]+\.msvdn\.net/image/\w+/poster',
}, },
'expected_warnings': [ 'expected_warnings': [
'Ignoring alternative content ID: WDAF1KOWUpH3', 'Ignoring alternative content ID: WDAF1KOWUpH3',
@ -46,10 +45,10 @@ class MainStreamingIE(InfoExtractor):
'url': 'https://webtools-859c1818ed614cc5b0047439470927b0.msvdn.net/embed/tDoFkZD3T1Lw', 'url': 'https://webtools-859c1818ed614cc5b0047439470927b0.msvdn.net/embed/tDoFkZD3T1Lw',
'info_dict': { 'info_dict': {
'id': 'tDoFkZD3T1Lw', 'id': 'tDoFkZD3T1Lw',
'title': r're:Class CNBC Live \d{4}-\d{2}-\d{2} \d{2}:\d{2}$', 'title': str,
'live_status': 'is_live', 'live_status': 'is_live',
'ext': 'mp4', 'ext': 'mp4',
'thumbnail': r're:https?://[A-Za-z0-9-]*\.msvdn.net/image/\w+/poster', 'thumbnail': r're:https?://[\w-]+\.msvdn\.net/image/\w+/poster',
}, },
'skip': 'live stream', 'skip': 'live stream',
}, { }, {
@ -57,38 +56,38 @@ class MainStreamingIE(InfoExtractor):
'info_dict': { 'info_dict': {
'id': 'EUlZfGWkGpOd', 'id': 'EUlZfGWkGpOd',
'title': 'La Settimana ', 'title': 'La Settimana ',
'description': '03 Ottobre ore 02:00', 'description': 'md5:4ba134e31c76288586949451a493812c',
'ext': 'mp4', 'ext': 'mp4',
'live_status': 'not_live', 'live_status': 'not_live',
'thumbnail': r're:https?://[A-Za-z0-9-]*\.msvdn.net/image/\w+/poster', 'thumbnail': r're:https?://[\w-]+\.msvdn\.net/image/\w+/poster',
'duration': 1512, 'duration': 1512,
}, },
'skip': 'Invalid URL',
}, { }, {
# video without webtools- prefix # video without webtools- prefix
'url': 'https://f5842579ff984c1c98d63b8d789673eb.msvdn.net/embed/MfuWmzL2lGkA?autoplay=false&T=1635860445', 'url': 'https://f5842579ff984c1c98d63b8d789673eb.msvdn.net/embed/MfuWmzL2lGkA?autoplay=false&T=1635860445',
'info_dict': { 'info_dict': {
'id': 'MfuWmzL2lGkA', 'id': 'MfuWmzL2lGkA',
'title': 'TG Mattina', 'title': 'TG Mattina',
'description': '06 Ottobre ore 08:00', 'description': 'md5:d0e1efdc4cdaeba9628ce76f68a2496c',
'ext': 'mp4', 'ext': 'mp4',
'live_status': 'not_live', 'live_status': 'not_live',
'thumbnail': r're:https?://[A-Za-z0-9-]*\.msvdn.net/image/\w+/poster', 'thumbnail': r're:https?://[\w-]+\.msvdn\.net/image/\w+/poster',
'duration': 789.04, 'duration': 789.04,
}, },
'skip': 'Invalid URL',
}, { }, {
# always-on livestream with DVR # always-on livestream with DVR
'url': 'https://webtools-f5842579ff984c1c98d63b8d789673eb.msvdn.net/embed/HVvPMzy', 'url': 'https://webtools-f5842579ff984c1c98d63b8d789673eb.msvdn.net/embed/HVvPMzy',
'info_dict': { 'info_dict': {
'id': 'HVvPMzy', 'id': 'HVvPMzy',
'title': r're:^Diretta LaC News24 \d{4}-\d{2}-\d{2} \d{2}:\d{2}$', 'title': str,
'description': 'canale all news', 'description': 'md5:f18ace9d2fe1a83445ef829bb635f40c',
'live_status': 'is_live', 'live_status': 'is_live',
'ext': 'mp4', 'ext': 'mp4',
'thumbnail': r're:https?://[A-Za-z0-9-]*\.msvdn.net/image/\w+/poster', 'thumbnail': r're:https?://[\w-]+\.msvdn\.net/image/\w+/poster',
},
'params': {
'skip_download': True,
}, },
'params': {'skip_download': 'm3u8'},
}, { }, {
# no host # no host
'url': 'https://webtools.msvdn.net/embed/MfuWmzL2lGkA', 'url': 'https://webtools.msvdn.net/embed/MfuWmzL2lGkA',
@ -99,8 +98,21 @@ class MainStreamingIE(InfoExtractor):
}, { }, {
'url': 'https://859c1818ed614cc5b0047439470927b0.msvdn.net/content/tDoFkZD3T1Lw#', 'url': 'https://859c1818ed614cc5b0047439470927b0.msvdn.net/content/tDoFkZD3T1Lw#',
'only_matching': True, 'only_matching': True,
}]
_WEBPAGE_TESTS = [{
'url': 'https://www.lacplay.it/video/in-evidenza_728/lac-storie-p-250-i-santi-pietro-e-paolo_77297/',
'info_dict': {
'id': 'u7kiX5DUaHYr',
'ext': 'mp4',
'title': 'I Santi Pietro e Paolo',
'description': 'md5:ff6be24916ba6b9ae990bf5f3df4911e',
'duration': 1700.0,
'thumbnail': r're:https?://.+',
'tags': '06/07/2025',
'live_status': 'not_live',
}, },
] 'skip': 'IE fix required; embed detection',
}]
def _playlist_entries(self, host, playlist_content): def _playlist_entries(self, host, playlist_content):
for entry in playlist_content: for entry in playlist_content: