diff options
author | Philipp Hagemeister <phihag@phihag.de> | 2014-05-16 15:51:01 +0200 |
---|---|---|
committer | Philipp Hagemeister <phihag@phihag.de> | 2014-05-16 15:51:01 +0200 |
commit | 5c30b2684620357a9481e59087a1209f685e9305 (patch) | |
tree | 65d635bbf76124a96468881cc35dc70a24698d6c /youtube_dl/extractor/francetv.py | |
parent | f07b74fc18aac210c60ee8b8cb29b5b43b0eb780 (diff) |
[francetv] Add support for non-numeric video IDs (Fixes #2927)
Diffstat (limited to 'youtube_dl/extractor/francetv.py')
-rw-r--r-- | youtube_dl/extractor/francetv.py | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/youtube_dl/extractor/francetv.py b/youtube_dl/extractor/francetv.py index 51eb97b2f..f3e0f38b7 100644 --- a/youtube_dl/extractor/francetv.py +++ b/youtube_dl/extractor/francetv.py @@ -48,24 +48,36 @@ class PluzzIE(FranceTVBaseInfoExtractor): class FranceTvInfoIE(FranceTVBaseInfoExtractor): IE_NAME = 'francetvinfo.fr' - _VALID_URL = r'https?://www\.francetvinfo\.fr/replay.*/(?P<title>.+)\.html' + _VALID_URL = r'https?://www\.francetvinfo\.fr/.*/(?P<title>.+)\.html' - _TEST = { + _TESTS = [{ 'url': 'http://www.francetvinfo.fr/replay-jt/france-3/soir-3/jt-grand-soir-3-lundi-26-aout-2013_393427.html', - 'file': '84981923.mp4', 'info_dict': { + 'id': '84981923', + 'ext': 'mp4', 'title': 'Soir 3', }, 'params': { 'skip_download': True, }, - } + }, { + 'url': 'http://www.francetvinfo.fr/elections/europeennes/direct-europeennes-regardez-le-debat-entre-les-candidats-a-la-presidence-de-la-commission_600639.html', + 'info_dict': { + 'id': 'EV_20019', + 'ext': 'mp4', + 'title': 'Débat des candidats à la Commission européenne', + 'description': 'Débat des candidats à la Commission européenne', + }, + 'params': { + 'skip_download': 'HLS (reqires ffmpeg)' + } + }] def _real_extract(self, url): mobj = re.match(self._VALID_URL, url) page_title = mobj.group('title') webpage = self._download_webpage(url, page_title) - video_id = self._search_regex(r'id-video=(\d+?)[@"]', webpage, 'video id') + video_id = self._search_regex(r'id-video=((?:[^0-9]*?_)?[0-9]+)[@"]', webpage, 'video id') return self._extract_video(video_id) |