also accept season and episode numbers for titles that support it

This commit is contained in:
dove 2024-12-21 00:39:07 -03:00 committed by GitHub
parent 626a901584
commit 23e35dc851
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -20,6 +20,8 @@ class GloboIE(InfoExtractor):
video(id: $videoId) {
duration
description
relatedEpisodeNumber
relatedSeasonNumber
headline
title {
originProgramId
@ -57,6 +59,28 @@ 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 14081989',
'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
}
}]
def _real_extract(self, url):
@ -113,6 +137,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,