mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-21 20:46:36 -05:00
[drtv] Fix extraction (closes #18989)
This commit is contained in:
parent
0eba178fce
commit
1602a240a7
1 changed files with 4 additions and 5 deletions
|
@ -77,10 +77,9 @@ def _real_extract(self, url):
|
||||||
r'data-resource="[^>"]+mu/programcard/expanded/([^"]+)"'),
|
r'data-resource="[^>"]+mu/programcard/expanded/([^"]+)"'),
|
||||||
webpage, 'video id')
|
webpage, 'video id')
|
||||||
|
|
||||||
programcard = self._download_json(
|
data = self._download_json(
|
||||||
'http://www.dr.dk/mu/programcard/expanded/%s' % video_id,
|
'https://www.dr.dk/mu-online/api/1.4/programcard/%s' % video_id,
|
||||||
video_id, 'Downloading video JSON')
|
video_id, 'Downloading video JSON', query={'expanded': 'true'})
|
||||||
data = programcard['Data'][0]
|
|
||||||
|
|
||||||
title = remove_end(self._og_search_title(
|
title = remove_end(self._og_search_title(
|
||||||
webpage, default=None), ' | TV | DR') or data['Title']
|
webpage, default=None), ' | TV | DR') or data['Title']
|
||||||
|
@ -97,7 +96,7 @@ def _real_extract(self, url):
|
||||||
formats = []
|
formats = []
|
||||||
subtitles = {}
|
subtitles = {}
|
||||||
|
|
||||||
for asset in data['Assets']:
|
for asset in [data['PrimaryAsset']]:
|
||||||
kind = asset.get('Kind')
|
kind = asset.get('Kind')
|
||||||
if kind == 'Image':
|
if kind == 'Image':
|
||||||
thumbnail = asset.get('Uri')
|
thumbnail = asset.get('Uri')
|
||||||
|
|
Loading…
Reference in a new issue