diff options
author | Jaime Marquínez Ferrándiz <[email protected]> | 2013-07-05 12:56:41 +0200 |
---|---|---|
committer | Jaime Marquínez Ferrándiz <[email protected]> | 2013-07-05 12:56:41 +0200 |
commit | 9941ceb33146e4552cf7a1008c36e5858660605d (patch) | |
tree | a83af7f531f7b346baa284b868929e30ea507d11 | |
parent | c536d380595cc1b7484474231e5c58f4098d2e25 (diff) | |
download | youtube-dl-9941ceb33146e4552cf7a1008c36e5858660605d.tar.gz youtube-dl-9941ceb33146e4552cf7a1008c36e5858660605d.zip |
ArteTVIE: support emission urls that don't contain the video id
Like http://www.arte.tv/guide/fr/emissions/AJT/arte-journal
-rw-r--r-- | youtube_dl/extractor/arte.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/youtube_dl/extractor/arte.py b/youtube_dl/extractor/arte.py index 14725276d..f52672490 100644 --- a/youtube_dl/extractor/arte.py +++ b/youtube_dl/extractor/arte.py @@ -77,7 +77,12 @@ class ArteTvIE(InfoExtractor): def _extract_emission(self, url, video_id, lang): """Extract from www.arte.tv/guide""" - json_url = 'http://org-www.arte.tv/papi/tvguide/videos/stream/player/F/%s_PLUS7-F/ALL/ALL.json' % video_id + if video_id.replace('-','').isdigit(): + json_url = 'http://org-www.arte.tv/papi/tvguide/videos/stream/player/F/%s_PLUS7-F/ALL/ALL.json' % video_id + else: + # We don't know the real id of the video, we have to search in the webpage + webpage = self._download_webpage(url, video_id) + json_url = self._html_search_regex(r'arte_vp_url="(.*?)"', webpage, 'json url') json_info = self._download_webpage(json_url, video_id, 'Downloading info json') self.report_extraction(video_id) |