mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-12-22 04:54:16 +00:00
[tv4] Fix extraction and extract series metadata (closes #22443)
This commit is contained in:
parent
e1f692f0b3
commit
20e11b70ac
@ -72,8 +72,13 @@ class TV4IE(InfoExtractor):
|
|||||||
video_id = self._match_id(url)
|
video_id = self._match_id(url)
|
||||||
|
|
||||||
info = self._download_json(
|
info = self._download_json(
|
||||||
'http://www.tv4play.se/player/assets/%s.json' % video_id,
|
'https://playback-api.b17g.net/asset/%s' % video_id,
|
||||||
video_id, 'Downloading video info JSON')
|
video_id, 'Downloading video info JSON', query={
|
||||||
|
'service': 'tv4',
|
||||||
|
'device': 'browser',
|
||||||
|
'protocol': 'hls,dash',
|
||||||
|
'drm': 'widevine',
|
||||||
|
})['metadata']
|
||||||
|
|
||||||
title = info['title']
|
title = info['title']
|
||||||
|
|
||||||
@ -111,5 +116,9 @@ class TV4IE(InfoExtractor):
|
|||||||
'timestamp': parse_iso8601(info.get('broadcast_date_time')),
|
'timestamp': parse_iso8601(info.get('broadcast_date_time')),
|
||||||
'duration': int_or_none(info.get('duration')),
|
'duration': int_or_none(info.get('duration')),
|
||||||
'thumbnail': info.get('image'),
|
'thumbnail': info.get('image'),
|
||||||
'is_live': info.get('is_live') is True,
|
'is_live': info.get('isLive') is True,
|
||||||
|
'series': info.get('seriesTitle'),
|
||||||
|
'season_number': int_or_none(info.get('seasonNumber')),
|
||||||
|
'episode': info.get('episodeTitle'),
|
||||||
|
'episode_number': int_or_none(info.get('episodeNumber')),
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user