mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2026-06-29 06:06:09 +00:00
Compare commits
No commits in common. "9ac6340cc247614dfc33ae475c3cdc86a50c1c73" and "2fd6fc11c48b58debcf23de3914103906d9b0ddb" have entirely different histories.
9ac6340cc2
...
2fd6fc11c4
@ -6,7 +6,6 @@ from ..utils import (
|
|||||||
float_or_none,
|
float_or_none,
|
||||||
orderedSet,
|
orderedSet,
|
||||||
str_or_none,
|
str_or_none,
|
||||||
try_get,
|
|
||||||
)
|
)
|
||||||
from ..utils.traversal import subs_list_to_dict, traverse_obj
|
from ..utils.traversal import subs_list_to_dict, traverse_obj
|
||||||
|
|
||||||
@ -86,8 +85,6 @@ class GloboIE(InfoExtractor):
|
|||||||
'content_protection': 'widevine',
|
'content_protection': 'widevine',
|
||||||
'vsid': '2938bc7c-9376-d4b7-ee91-ce46dbbf9f4d',
|
'vsid': '2938bc7c-9376-d4b7-ee91-ce46dbbf9f4d',
|
||||||
'tz': '-03:00',
|
'tz': '-03:00',
|
||||||
'Authorization': try_get(self._get_cookies('https://globo.com'),
|
|
||||||
lambda x: f'Bearer {x["GLBID"].value}') or '',
|
|
||||||
'version': 1,
|
'version': 1,
|
||||||
}).encode())
|
}).encode())
|
||||||
|
|
||||||
@ -99,8 +96,8 @@ class GloboIE(InfoExtractor):
|
|||||||
formats, subtitles = self._extract_m3u8_formats_and_subtitles(
|
formats, subtitles = self._extract_m3u8_formats_and_subtitles(
|
||||||
main_source['url'], video_id, 'mp4', entry_protocol='m3u8_native', m3u8_id='hls', fatal=False)
|
main_source['url'], video_id, 'mp4', entry_protocol='m3u8_native', m3u8_id='hls', fatal=False)
|
||||||
self._merge_subtitles(traverse_obj(main_source, ('text', ..., {
|
self._merge_subtitles(traverse_obj(main_source, ('text', ..., {
|
||||||
'url': ('subtitle', 'srt', 'url', {str_or_none}),
|
'url': ('subtitle', 'srt', 'url', {str}),
|
||||||
}, all, {subs_list_to_dict})), target=subtitles)
|
}, all, {subs_list_to_dict(lang='por')})))
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'id': video_id,
|
'id': video_id,
|
||||||
@ -116,7 +113,7 @@ class GloboIE(InfoExtractor):
|
|||||||
|
|
||||||
|
|
||||||
class GloboArticleIE(InfoExtractor):
|
class GloboArticleIE(InfoExtractor):
|
||||||
_VALID_URL = r'https?://(?!globoplay).+?\.globo\.com/(?:[^/]+/)*(?P<id>[^/.]+)(?:\.html)?'
|
_VALID_URL = r'https?://.+?\.globo\.com/(?:[^/]+/)*(?P<id>[^/.]+)(?:\.html)?'
|
||||||
|
|
||||||
_VIDEOID_REGEXES = [
|
_VIDEOID_REGEXES = [
|
||||||
r'\bdata-video-id=["\'](\d{7,})["\']',
|
r'\bdata-video-id=["\'](\d{7,})["\']',
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user