From 4c63497cc6d8382e8e06a09c42e2e18be7621efd Mon Sep 17 00:00:00 2001 From: slipinthedove Date: Thu, 19 Dec 2024 22:13:29 -0300 Subject: [PATCH] actually fix subs to dict; exclude globoplay from globoarticle regex --- yt_dlp/extractor/globo.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yt_dlp/extractor/globo.py b/yt_dlp/extractor/globo.py index 564a9afb07..f7b503ab3a 100644 --- a/yt_dlp/extractor/globo.py +++ b/yt_dlp/extractor/globo.py @@ -96,8 +96,8 @@ class GloboIE(InfoExtractor): formats, subtitles = self._extract_m3u8_formats_and_subtitles( main_source['url'], video_id, 'mp4', entry_protocol='m3u8_native', m3u8_id='hls', fatal=False) self._merge_subtitles(traverse_obj(main_source, ('text', ..., { - 'url': ('subtitle', 'srt', 'url', {str}), - }, all, {subs_list_to_dict(lang='por')}))) + 'url': ('subtitle', 'srt', 'url', {str_or_none}), + }, all, {subs_list_to_dict(lang='por')})), target=subtitles) return { 'id': video_id, @@ -113,7 +113,7 @@ class GloboIE(InfoExtractor): class GloboArticleIE(InfoExtractor): - _VALID_URL = r'https?://.+?\.globo\.com/(?:[^/]+/)*(?P[^/.]+)(?:\.html)?' + _VALID_URL = r'https?://(?!globoplay).+?\.globo\.com/(?:[^/]+/)*(?P[^/.]+)(?:\.html)?' _VIDEOID_REGEXES = [ r'\bdata-video-id=["\'](\d{7,})["\']',