From 97516d5ed3476dfaa358c441fa904f30901d2697 Mon Sep 17 00:00:00 2001 From: dirkf Date: Mon, 7 Oct 2024 12:53:03 +0100 Subject: [PATCH 1/4] [ORFRadio] Support /programm/ URL format * fixes yt-dlp/yt-dlp#11014 --- youtube_dl/extractor/orf.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/youtube_dl/extractor/orf.py b/youtube_dl/extractor/orf.py index 1ee78edbc..2e1341f44 100644 --- a/youtube_dl/extractor/orf.py +++ b/youtube_dl/extractor/orf.py @@ -112,7 +112,7 @@ class ORFRadioIE(ORFRadioBase): _VALID_URL = ( r'https?://sound\.orf\.at/radio/(?P{0})/sendung/(?P\d+)(?:/(?P\w+))?'.format(_STATION_RE), - r'https?://(?P{0})\.orf\.at/player/(?P\d{{8}})/(?P\d+)'.format(_STATION_RE), + r'https?://(?P{0})\.orf\.at/(?:player|programm)/(?P\d{{8}})/(?P\d+)'.format(_STATION_RE), ) _TESTS = [{ @@ -150,6 +150,10 @@ class ORFRadioIE(ORFRadioBase): 'duration': 1500, }, 'skip': 'Shows from ORF Sound are only available for 30 days.' + }, { + # yt-dlp/yt-dlp#11014 + 'url': 'https://oe1.orf.at/programm/20240916/769302/Playgrounds', + 'only_matching': True, }] def _real_extract(self, url): From 8388ee5f8d5a1a9728546d27a2ca8f13cc133778 Mon Sep 17 00:00:00 2001 From: dirkf Date: Mon, 7 Oct 2024 13:14:16 +0100 Subject: [PATCH 2/4] [HentaiStigma] Support new frame format with HTML5 video * resolves #25019 --- youtube_dl/extractor/hentaistigma.py | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/youtube_dl/extractor/hentaistigma.py b/youtube_dl/extractor/hentaistigma.py index 86a93de4d..c01fe05fd 100644 --- a/youtube_dl/extractor/hentaistigma.py +++ b/youtube_dl/extractor/hentaistigma.py @@ -1,6 +1,11 @@ +# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor +from ..utils import ( + merge_dicts, + traverse_obj, +) class HentaiStigmaIE(InfoExtractor): @@ -24,16 +29,17 @@ class HentaiStigmaIE(InfoExtractor): title = self._html_search_regex( r']+class="posttitle"[^>]*>]*>([^<]+)', webpage, 'title') - wrap_url = self._html_search_regex( + + wrap_url = self._search_regex( r']+src="([^"]+mp4)"', webpage, 'wrapper url') - wrap_webpage = self._download_webpage(wrap_url, video_id) - video_url = self._html_search_regex( - r'file\s*:\s*"([^"]+)"', wrap_webpage, 'video url') + vid_page = self._download_webpage(wrap_url, video_id) - return { + entries = self._parse_html5_media_entries(wrap_url, vid_page, video_id) + self._sort_formats(traverse_obj(entries, (0, 'formats')) or []) + + return merge_dicts({ 'id': video_id, - 'url': video_url, 'title': title, 'age_limit': 18, - } + }, entries[0]) From fa7fdb263be6f5f41ad5e3cf54b949f3a918bd02 Mon Sep 17 00:00:00 2001 From: dirkf Date: Mon, 7 Oct 2024 13:28:17 +0100 Subject: [PATCH 3/4] [Mgoon,Kaltura] Fix regex typo `(:?` * thx yt-dlp/yt-dlp#10807 (584d455) --- youtube_dl/extractor/kaltura.py | 2 +- youtube_dl/extractor/mgoon.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/youtube_dl/extractor/kaltura.py b/youtube_dl/extractor/kaltura.py index 6d4d93394..861b6952b 100644 --- a/youtube_dl/extractor/kaltura.py +++ b/youtube_dl/extractor/kaltura.py @@ -23,7 +23,7 @@ class KalturaIE(InfoExtractor): (?: kaltura:(?P\d+):(?P[0-9a-z_]+)| https?:// - (:?(?:www|cdnapi(?:sec)?)\.)?kaltura\.com(?::\d+)?/ + (?:(?:www|cdnapi(?:sec)?)\.)?kaltura\.com(?::\d+)?/ (?: (?: # flash player diff --git a/youtube_dl/extractor/mgoon.py b/youtube_dl/extractor/mgoon.py index 7bb473900..56086f7b9 100644 --- a/youtube_dl/extractor/mgoon.py +++ b/youtube_dl/extractor/mgoon.py @@ -13,7 +13,7 @@ from ..utils import ( class MgoonIE(InfoExtractor): _VALID_URL = r'''(?x)https?://(?:www\.)? - (?:(:?m\.)?mgoon\.com/(?:ch/(?:.+)/v|play/view)| + (?:(?:m\.)?mgoon\.com/(?:ch/(?:.+)/v|play/view)| video\.mgoon\.com)/(?P[0-9]+)''' _API_URL = 'http://mpos.mgoon.com/player/video?id={0:}' _TESTS = [ From 10f38086d4562e5b5c04dbe55f1f403b732732d3 Mon Sep 17 00:00:00 2001 From: dirkf Date: Mon, 7 Oct 2024 14:54:20 +0100 Subject: [PATCH 4/4] [core] Fix jwplayer format parsing * thx yt-dlp/yt-dlp#10956 --- youtube_dl/extractor/common.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/youtube_dl/extractor/common.py b/youtube_dl/extractor/common.py index 9b0016d07..c54406e7a 100644 --- a/youtube_dl/extractor/common.py +++ b/youtube_dl/extractor/common.py @@ -3128,7 +3128,8 @@ class InfoExtractor(object): continue urls.add(source_url) source_type = source.get('type') or '' - ext = mimetype2ext(source_type) or determine_ext(source_url) + # https://github.com/yt-dlp/yt-dlp/pull/10956 + ext = determine_ext(source_url, default_ext=mimetype2ext(source_type)) if source_type == 'hls' or ext == 'm3u8' or 'format=m3u8-aapl' in source_url: formats.extend(self._extract_m3u8_formats( source_url, video_id, 'mp4', entry_protocol='m3u8_native',