diff options
author | Philipp Hagemeister <phihag@phihag.de> | 2014-01-17 03:02:55 +0100 |
---|---|---|
committer | Philipp Hagemeister <phihag@phihag.de> | 2014-01-17 03:02:55 +0100 |
commit | 82696d5d5dba6f202c423119f6ee350cff315eab (patch) | |
tree | bdb18e01271022f6ce4fb58c61a806e45aaf5ed8 /youtube_dl | |
parent | 9eea4fb835fd0d976a4611d93894bbaaecbbb82e (diff) | |
parent | c8650f7ecd4fd253b37103c5581d39ddc37b6337 (diff) |
Merge remote-tracking branch 'sahutd/master'
Diffstat (limited to 'youtube_dl')
-rw-r--r-- | youtube_dl/extractor/__init__.py | 1 | ||||
-rw-r--r-- | youtube_dl/extractor/franceinter.py | 31 |
2 files changed, 32 insertions, 0 deletions
diff --git a/youtube_dl/extractor/__init__.py b/youtube_dl/extractor/__init__.py index 01659e575..d66f7b026 100644 --- a/youtube_dl/extractor/__init__.py +++ b/youtube_dl/extractor/__init__.py @@ -62,6 +62,7 @@ from .fktv import ( FKTVPosteckeIE, ) from .flickr import FlickrIE +from .franceinter import FranceInterIE from .francetv import ( PluzzIE, FranceTvInfoIE, diff --git a/youtube_dl/extractor/franceinter.py b/youtube_dl/extractor/franceinter.py new file mode 100644 index 000000000..932a1f161 --- /dev/null +++ b/youtube_dl/extractor/franceinter.py @@ -0,0 +1,31 @@ +from __future__ import unicode_literals + +import re + +from .common import InfoExtractor +class FranceInterIE(InfoExtractor): + + _VALID_URL=r'http://(?:www\.)?franceinter\.fr/player/reecouter\?play=(?P<id>[0-9]{6})' + _TEST={ + u'url':u'http://www.franceinter.fr/player/reecouter?play=793962', + u'file':u'793962.mp3' + + } + + + + + def _real_extract(self,url): + + mobj = re.match(self._VALID_URL, url) + video_id = mobj.group('id') + + webpage=self._download_webpage(url,video_id) + + title=self._search_regex(u'(?<=<span class="roll_overflow">)(.*)(?=</span></h1>)', webpage, u'title') + + video_url='http://www.franceinter.fr/'+self._search_regex(u'(?<=&urlAOD=)(.*)(?=&startTime)', webpage, u'video url') + + return{'id': video_id,u'url': video_url,u'title': title} + +
\ No newline at end of file |