mirror of
https://github.com/yt-dlp/yt-dlp
synced 2025-02-05 08:46:37 +01:00
[ie/tvplay] fix: support more video types
This commit is contained in:
parent
225ada61fd
commit
b564e28949
1 changed files with 4 additions and 6 deletions
|
@ -280,12 +280,10 @@ class TVPlayHomeIE(InfoExtractor):
|
||||||
data = self._download_json(
|
data = self._download_json(
|
||||||
urljoin(url, f'/api/products/{api_path}/{video_id}?platform=BROWSER&lang={country.upper()}'),
|
urljoin(url, f'/api/products/{api_path}/{video_id}?platform=BROWSER&lang={country.upper()}'),
|
||||||
video_id)
|
video_id)
|
||||||
|
video_type = 'MOVIE'
|
||||||
video_type = {
|
if category not in ('episode', 'clip'):
|
||||||
'live': 'LIVE',
|
video_type = traverse_obj(data, ('mainCategory', 'categoryType')) or 'MOVIE'
|
||||||
'programme': 'CATCHUP',
|
stream_id = traverse_obj(data, ('live', 'id')) or data.get('programRecordingId') or video_id
|
||||||
}.get(category) or 'MOVIE'
|
|
||||||
stream_id = data.get('programRecordingId') or video_id
|
|
||||||
stream = self._download_json(
|
stream = self._download_json(
|
||||||
urljoin(url, f'/api/products/{stream_id}/videos/playlist?videoType={video_type}&platform=BROWSER'), video_id)
|
urljoin(url, f'/api/products/{stream_id}/videos/playlist?videoType={video_type}&platform=BROWSER'), video_id)
|
||||||
formats, subtitles = self._extract_m3u8_formats_and_subtitles(
|
formats, subtitles = self._extract_m3u8_formats_and_subtitles(
|
||||||
|
|
Loading…
Add table
Reference in a new issue