mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2026-05-05 06:56:03 +00:00
Compare commits
5 Commits
2fd6fc11c4
...
9ac6340cc2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9ac6340cc2 | ||
|
|
fb3ef7fc85 | ||
|
|
a6e6c3f02d | ||
|
|
cec240eb2d | ||
|
|
4c63497cc6 |
@ -6,6 +6,7 @@ from ..utils import (
|
||||
float_or_none,
|
||||
orderedSet,
|
||||
str_or_none,
|
||||
try_get,
|
||||
)
|
||||
from ..utils.traversal import subs_list_to_dict, traverse_obj
|
||||
|
||||
@ -85,6 +86,8 @@ class GloboIE(InfoExtractor):
|
||||
'content_protection': 'widevine',
|
||||
'vsid': '2938bc7c-9376-d4b7-ee91-ce46dbbf9f4d',
|
||||
'tz': '-03:00',
|
||||
'Authorization': try_get(self._get_cookies('https://globo.com'),
|
||||
lambda x: f'Bearer {x["GLBID"].value}') or '',
|
||||
'version': 1,
|
||||
}).encode())
|
||||
|
||||
@ -96,8 +99,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})), target=subtitles)
|
||||
|
||||
return {
|
||||
'id': video_id,
|
||||
@ -113,7 +116,7 @@ class GloboIE(InfoExtractor):
|
||||
|
||||
|
||||
class GloboArticleIE(InfoExtractor):
|
||||
_VALID_URL = r'https?://.+?\.globo\.com/(?:[^/]+/)*(?P<id>[^/.]+)(?:\.html)?'
|
||||
_VALID_URL = r'https?://(?!globoplay).+?\.globo\.com/(?:[^/]+/)*(?P<id>[^/.]+)(?:\.html)?'
|
||||
|
||||
_VIDEOID_REGEXES = [
|
||||
r'\bdata-video-id=["\'](\d{7,})["\']',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user