]>
Raphaël G. Git Repositories - youtubedl/blob - youtube_dl/extractor/ina.py
65712abc28c3cc68cab7052ab709b2c1e6500cb5
2 from __future__
import unicode_literals
6 from .common
import InfoExtractor
9 class InaIE(InfoExtractor
):
10 _VALID_URL
= r
'https?://(?:www\.)?ina\.fr/video/(?P<id>I?[A-Z0-9]+)'
12 'url': 'http://www.ina.fr/video/I12055569/francois-hollande-je-crois-que-c-est-clair-video.html',
13 'md5': 'a667021bf2b41f8dc6049479d9bb38a3',
17 'title': 'François Hollande "Je crois que c\'est clair"',
21 def _real_extract(self
, url
):
22 mobj
= re
.match(self
._VALID
_URL
, url
)
24 video_id
= mobj
.group('id')
25 mrss_url
= 'http://player.ina.fr/notices/%s.mrss' % video_id
26 info_doc
= self
._download
_xml
(mrss_url
, video_id
)
28 self
.report_extraction(video_id
)
30 video_url
= info_doc
.find('.//{http://search.yahoo.com/mrss/}player').attrib
['url']
35 'title': info_doc
.find('.//title').text
,