aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl
diff options
context:
space:
mode:
Diffstat (limited to 'youtube_dl')
-rw-r--r--youtube_dl/extractor/drtv.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/youtube_dl/extractor/drtv.py b/youtube_dl/extractor/drtv.py
index 8d113a5e8..d5df18d7c 100644
--- a/youtube_dl/extractor/drtv.py
+++ b/youtube_dl/extractor/drtv.py
@@ -25,9 +25,15 @@ class DRTVIE(SubtitlesInfoExtractor):
def _real_extract(self, url):
video_id = self._match_id(url)
- programcard = self._download_json(
- 'http://www.dr.dk/mu/programcard/expanded/%s' % video_id, video_id, 'Downloading video JSON')
+ webpage = self._download_webpage(url, video_id)
+
+ video_id = self._search_regex(
+ r'data-(?:material-identifier|episode-slug)="([^"]+)"',
+ 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]
title = data['Title']