mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2026-04-27 19:15:53 +00:00
Compare commits
9 Commits
9ac6340cc2
...
135cc6601c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
135cc6601c | ||
|
|
b0a3708308 | ||
|
|
5807662118 | ||
|
|
340ad4b812 | ||
|
|
254765b072 | ||
|
|
2558a339d7 | ||
|
|
b07353383f | ||
|
|
23e35dc851 | ||
|
|
626a901584 |
@ -1,9 +1,11 @@
|
||||
import json
|
||||
import re
|
||||
import uuid
|
||||
|
||||
from .common import InfoExtractor
|
||||
from ..utils import (
|
||||
float_or_none,
|
||||
int_or_none,
|
||||
orderedSet,
|
||||
str_or_none,
|
||||
try_get,
|
||||
@ -19,6 +21,8 @@ class GloboIE(InfoExtractor):
|
||||
video(id: $videoId) {
|
||||
duration
|
||||
description
|
||||
relatedEpisodeNumber
|
||||
relatedSeasonNumber
|
||||
headline
|
||||
title {
|
||||
originProgramId
|
||||
@ -56,6 +60,31 @@ class GloboIE(InfoExtractor):
|
||||
}, {
|
||||
'url': 'globo:3607726',
|
||||
'only_matching': True,
|
||||
},
|
||||
{
|
||||
'url': 'globo:8013907', # needs subscription to globoplay
|
||||
'info_dict': {
|
||||
'id': '8013907',
|
||||
'ext': 'mp4',
|
||||
'title': 'Capítulo de 14⧸08⧸1989',
|
||||
'episode_number': 1,
|
||||
},
|
||||
'params': {
|
||||
'skip_download': True,
|
||||
},
|
||||
},
|
||||
{
|
||||
'url': 'globo:12824146',
|
||||
'info_dict': {
|
||||
'id': '12824146',
|
||||
'ext': 'mp4',
|
||||
'title': 'Acordo de damas',
|
||||
'episode_number': 1,
|
||||
'season_number': 2,
|
||||
},
|
||||
'params': {
|
||||
'skip_download': True,
|
||||
},
|
||||
}]
|
||||
|
||||
def _real_extract(self, url):
|
||||
@ -84,7 +113,10 @@ class GloboIE(InfoExtractor):
|
||||
'video_id': video_id,
|
||||
'quality': 'max',
|
||||
'content_protection': 'widevine',
|
||||
'vsid': '2938bc7c-9376-d4b7-ee91-ce46dbbf9f4d',
|
||||
'vsid': f'{uuid.uuid4()}',
|
||||
'consumption': 'streaming',
|
||||
'capabilities': {'low_latency': True},
|
||||
'metadata': {'name': 'web', 'device': {'type': 'desktop', 'os': {}}},
|
||||
'tz': '-03:00',
|
||||
'Authorization': try_get(self._get_cookies('https://globo.com'),
|
||||
lambda x: f'Bearer {x["GLBID"].value}') or '',
|
||||
@ -109,6 +141,8 @@ class GloboIE(InfoExtractor):
|
||||
'duration': ('duration', {float_or_none(scale=1000)}),
|
||||
'uploader': ('title', 'headline', {str}),
|
||||
'uploader_id': ('title', 'originProgramId', {str_or_none}),
|
||||
'episode_number': ('relatedEpisodeNumber', {int_or_none}),
|
||||
'season_number': ('relatedSeasonNumber', {int_or_none}),
|
||||
}),
|
||||
'formats': formats,
|
||||
'subtitles': subtitles,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user