From: Sergey M․ Date: Mon, 2 Feb 2015 15:11:25 +0000 (+0600) Subject: [drtv] Extract material id (Closes #4814) X-Git-Url: https://git.cielonegro.org/gitweb.cgi?a=commitdiff_plain;h=78271e33197e56452dc60f075bd326cb908e8e7f;p=youtube-dl.git [drtv] Extract material id (Closes #4814) --- 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']