mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2026-06-27 05:05:01 +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,
|
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
|
||||||
|
|
||||||
@ -85,6 +86,8 @@ 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())
|
||||||
|
|
||||||
@ -96,8 +99,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}),
|
'url': ('subtitle', 'srt', 'url', {str_or_none}),
|
||||||
}, all, {subs_list_to_dict(lang='por')})))
|
}, all, {subs_list_to_dict})), target=subtitles)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'id': video_id,
|
'id': video_id,
|
||||||
@ -113,7 +116,7 @@ class GloboIE(InfoExtractor):
|
|||||||
|
|
||||||
|
|
||||||
class GloboArticleIE(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 = [
|
_VIDEOID_REGEXES = [
|
||||||
r'\bdata-video-id=["\'](\d{7,})["\']',
|
r'\bdata-video-id=["\'](\d{7,})["\']',
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user