about summary refs log tree commit diff
path: root/youtube_dl/extractor/drtv.py
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2019-01-25 04:16:49 +0700
committerSergey M․ <dstftw@gmail.com>2019-01-25 04:16:49 +0700
commit1602a240a7742f9e0a02b3f0effd215d00d859f2 (patch)
treee94df1a7310ee609e43bf632540583bbdeb27249 /youtube_dl/extractor/drtv.py
parent0eba178fce80923515f4a9ac411e46648a19d78c (diff)
downloadyoutube-dl-1602a240a7742f9e0a02b3f0effd215d00d859f2.tar.gz
youtube-dl-1602a240a7742f9e0a02b3f0effd215d00d859f2.tar.xz
youtube-dl-1602a240a7742f9e0a02b3f0effd215d00d859f2.zip
[drtv] Fix extraction (closes #18989)
Diffstat (limited to 'youtube_dl/extractor/drtv.py')
-rw-r--r--youtube_dl/extractor/drtv.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/youtube_dl/extractor/drtv.py b/youtube_dl/extractor/drtv.py
index f757745ba..8d63ca433 100644
--- a/youtube_dl/extractor/drtv.py
+++ b/youtube_dl/extractor/drtv.py
@@ -77,10 +77,9 @@ class DRTVIE(InfoExtractor):
                 r'data-resource="[^>"]+mu/programcard/expanded/([^"]+)"'),
             webpage, 'video id')
 
-        programcard = self._download_json(
-            'http://www.dr.dk/mu/programcard/expanded/%s' % video_id,
-            video_id, 'Downloading video JSON')
-        data = programcard['Data'][0]
+        data = self._download_json(
+            'https://www.dr.dk/mu-online/api/1.4/programcard/%s' % video_id,
+            video_id, 'Downloading video JSON', query={'expanded': 'true'})
 
         title = remove_end(self._og_search_title(
             webpage, default=None), ' | TV | DR') or data['Title']
@@ -97,7 +96,7 @@ class DRTVIE(InfoExtractor):
         formats = []
         subtitles = {}
 
-        for asset in data['Assets']:
+        for asset in [data['PrimaryAsset']]:
             kind = asset.get('Kind')
             if kind == 'Image':
                 thumbnail = asset.get('Uri')