diff options
author | François Charlier <francois.charlier@redhat.com> | 2016-01-21 18:47:43 +0100 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2016-01-22 22:58:37 +0600 |
commit | 24114fee747c5cec4aae41f93581561fcb902e10 (patch) | |
tree | 63f6b56ed224d713e6e5bf07c1d8edc4f01df570 /youtube_dl/extractor/arte.py | |
parent | 220ee33f2b8a22d2fe992c26b32a046b77ce2a4a (diff) |
[arte:future] Fix extraction
[arte] Add support for more "Arte Future" uri
Diffstat (limited to 'youtube_dl/extractor/arte.py')
-rw-r--r-- | youtube_dl/extractor/arte.py | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/youtube_dl/extractor/arte.py b/youtube_dl/extractor/arte.py index 10301a8ea..964d38fdf 100644 --- a/youtube_dl/extractor/arte.py +++ b/youtube_dl/extractor/arte.py @@ -199,25 +199,26 @@ class ArteTVCreativeIE(ArteTVPlus7IE): class ArteTVFutureIE(ArteTVPlus7IE): IE_NAME = 'arte.tv:future' - _VALID_URL = r'https?://future\.arte\.tv/(?P<lang>fr|de)/(thema|sujet)/.*?#article-anchor-(?P<id>\d+)' - - _TEST = { - 'url': 'http://future.arte.tv/fr/sujet/info-sciences#article-anchor-7081', - 'info_dict': { - 'id': '5201', - 'ext': 'mp4', - 'title': 'Les champignons au secours de la planète', - 'upload_date': '20131101', + _VALID_URL = r'https?://future\.arte\.tv/(?P<lang>fr|de)/(?P<id>.+)' + + _TESTS = [ + { + 'url': 'http://future.arte.tv/fr/info-sciences/les-ecrevisses-aussi-sont-anxieuses', + 'info_dict': { + 'id': '050940-028-A', + 'ext': 'mp4', + 'title': 'Les écrevisses aussi peuvent être anxieuses', + }, }, - } - - def _real_extract(self, url): - anchor_id, lang = self._extract_url_info(url) - webpage = self._download_webpage(url, anchor_id) - row = self._search_regex( - r'(?s)id="%s"[^>]*>.+?(<div[^>]*arte_vp_url[^>]*>)' % anchor_id, - webpage, 'row') - return self._extract_from_webpage(row, anchor_id, lang) + { + 'url': 'http://future.arte.tv/fr/la-science-est-elle-responsable', + 'info_dict': { + 'id': '061982-002-A', + 'ext': 'mp4', + 'title': 'Brian P. Schmidt - Prix Nobel de physique 2011', + }, + } + ] class ArteTVDDCIE(ArteTVPlus7IE): |