mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2026-06-24 11:45:02 +00:00
Compare commits
No commits in common. "135cc6601cb52efe6930351f941b0a80f540b352" and "9ac6340cc247614dfc33ae475c3cdc86a50c1c73" have entirely different histories.
135cc6601c
...
9ac6340cc2
@ -1,11 +1,9 @@
|
|||||||
import json
|
import json
|
||||||
import re
|
import re
|
||||||
import uuid
|
|
||||||
|
|
||||||
from .common import InfoExtractor
|
from .common import InfoExtractor
|
||||||
from ..utils import (
|
from ..utils import (
|
||||||
float_or_none,
|
float_or_none,
|
||||||
int_or_none,
|
|
||||||
orderedSet,
|
orderedSet,
|
||||||
str_or_none,
|
str_or_none,
|
||||||
try_get,
|
try_get,
|
||||||
@ -21,8 +19,6 @@ class GloboIE(InfoExtractor):
|
|||||||
video(id: $videoId) {
|
video(id: $videoId) {
|
||||||
duration
|
duration
|
||||||
description
|
description
|
||||||
relatedEpisodeNumber
|
|
||||||
relatedSeasonNumber
|
|
||||||
headline
|
headline
|
||||||
title {
|
title {
|
||||||
originProgramId
|
originProgramId
|
||||||
@ -60,31 +56,6 @@ class GloboIE(InfoExtractor):
|
|||||||
}, {
|
}, {
|
||||||
'url': 'globo:3607726',
|
'url': 'globo:3607726',
|
||||||
'only_matching': True,
|
'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):
|
def _real_extract(self, url):
|
||||||
@ -113,10 +84,7 @@ class GloboIE(InfoExtractor):
|
|||||||
'video_id': video_id,
|
'video_id': video_id,
|
||||||
'quality': 'max',
|
'quality': 'max',
|
||||||
'content_protection': 'widevine',
|
'content_protection': 'widevine',
|
||||||
'vsid': f'{uuid.uuid4()}',
|
'vsid': '2938bc7c-9376-d4b7-ee91-ce46dbbf9f4d',
|
||||||
'consumption': 'streaming',
|
|
||||||
'capabilities': {'low_latency': True},
|
|
||||||
'metadata': {'name': 'web', 'device': {'type': 'desktop', 'os': {}}},
|
|
||||||
'tz': '-03:00',
|
'tz': '-03:00',
|
||||||
'Authorization': try_get(self._get_cookies('https://globo.com'),
|
'Authorization': try_get(self._get_cookies('https://globo.com'),
|
||||||
lambda x: f'Bearer {x["GLBID"].value}') or '',
|
lambda x: f'Bearer {x["GLBID"].value}') or '',
|
||||||
@ -141,8 +109,6 @@ class GloboIE(InfoExtractor):
|
|||||||
'duration': ('duration', {float_or_none(scale=1000)}),
|
'duration': ('duration', {float_or_none(scale=1000)}),
|
||||||
'uploader': ('title', 'headline', {str}),
|
'uploader': ('title', 'headline', {str}),
|
||||||
'uploader_id': ('title', 'originProgramId', {str_or_none}),
|
'uploader_id': ('title', 'originProgramId', {str_or_none}),
|
||||||
'episode_number': ('relatedEpisodeNumber', {int_or_none}),
|
|
||||||
'season_number': ('relatedSeasonNumber', {int_or_none}),
|
|
||||||
}),
|
}),
|
||||||
'formats': formats,
|
'formats': formats,
|
||||||
'subtitles': subtitles,
|
'subtitles': subtitles,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user