mirror of
https://github.com/yt-dlp/yt-dlp
synced 2024-12-26 21:59:08 +01:00
[ie/drtv] Fix series, season_number and geo-restriction extraction
This commit is contained in:
parent
f101e5d34c
commit
cec8e95ce8
1 changed files with 5 additions and 3 deletions
|
@ -222,9 +222,11 @@ class DRTVIE(InfoExtractor):
|
||||||
'ext': mimetype2ext(sub_track.get('format')) or 'vtt',
|
'ext': mimetype2ext(sub_track.get('format')) or 'vtt',
|
||||||
})
|
})
|
||||||
|
|
||||||
if not formats and traverse_obj(item, ('season', 'customFields', 'IsGeoRestricted')):
|
if not formats and traverse_obj(item, ('customFields', 'IsGeoRestricted')):
|
||||||
self.raise_geo_restricted(countries=self._GEO_COUNTRIES)
|
self.raise_geo_restricted(countries=self._GEO_COUNTRIES)
|
||||||
|
|
||||||
|
season_id = traverse_obj(item, ('seasonId'))
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'id': video_id,
|
'id': video_id,
|
||||||
'formats': formats,
|
'formats': formats,
|
||||||
|
@ -236,9 +238,9 @@ class DRTVIE(InfoExtractor):
|
||||||
'thumbnail': ('images', 'wallpaper'),
|
'thumbnail': ('images', 'wallpaper'),
|
||||||
'release_timestamp': ('customFields', 'BroadcastTimeDK', {parse_iso8601}),
|
'release_timestamp': ('customFields', 'BroadcastTimeDK', {parse_iso8601}),
|
||||||
'duration': ('duration', {int_or_none}),
|
'duration': ('duration', {int_or_none}),
|
||||||
'series': ('season', 'show', 'title'),
|
'series': ('show', 'title'),
|
||||||
'season': ('season', 'title'),
|
'season': ('season', 'title'),
|
||||||
'season_number': ('season', 'seasonNumber', {int_or_none}),
|
'season_number': ('show', 'seasons', 'items', (lambda _, v: season_id == v['id']), any, 'seasonNumber', {int_or_none}),
|
||||||
'season_id': 'seasonId',
|
'season_id': 'seasonId',
|
||||||
'episode': 'episodeName',
|
'episode': 'episodeName',
|
||||||
'episode_number': ('episodeNumber', {int_or_none}),
|
'episode_number': ('episodeNumber', {int_or_none}),
|
||||||
|
|
Loading…
Reference in a new issue