1
0
mirror of https://github.com/l1ving/youtube-dl synced 2025-02-05 05:52:59 +08:00

Let's use the mobile M3U8 file instead

This commit is contained in:
Pierre Rudloff 2013-09-08 22:23:52 +02:00
parent 79a068c4a7
commit da77de39d3

View File

@ -9,8 +9,7 @@ class PluzzIE(InfoExtractor):
_TEST = { _TEST = {
u'url': u'http://pluzz.francetv.fr/videos/doctor_who.html', u'url': u'http://pluzz.francetv.fr/videos/doctor_who.html',
u'file': u'12163.mp4', u'file': u'88444506.mp4'
u'md5': u'060158428b650f896c542dfbb3d6487f'
} }
def _real_extract(self, url): def _real_extract(self, url):
@ -21,14 +20,18 @@ class PluzzIE(InfoExtractor):
video_id = self._search_regex( video_id = self._search_regex(
r'data-diffusion="(\d+)"', webpage, 'ID') r'data-diffusion="(\d+)"', webpage, 'ID')
xml_desc = self._download_webpage('http://www.pluzz.fr/appftv/webservices/video/getInfosOeuvre.php?id-diffusion=' + video_id, title, 'Downloading XML config') xml_desc = self._download_webpage(
'http://www.pluzz.fr/appftv/webservices/video/'
'getInfosOeuvre.php?id-diffusion='
+ video_id, title, 'Downloading XML config')
manifest_url = self._search_regex(r'<url><\!\[CDATA\[(.*?)]]></url>', xml_desc, re.MULTILINE|re.DOTALL) manifest_url = self._search_regex(r'<url><\!\[CDATA\[(.*?)]]></url>',
xml_desc, re.MULTILINE|re.DOTALL)
token = self._download_webpage('http://hdfauth.francetv.fr/esi/urltokengen2.html?url=' + manifest_url, title, 'Getting token') video_url = manifest_url.replace('manifest.f4m', 'index_2_av.m3u8')
video_url = video_url.replace('/z/', '/i/')
return {'id': video_id, return {'id': video_id,
'ext': 'f4m', 'ext': 'mp4',
'url': video_url, 'url': video_url,
'title': title, 'title': title,
'thumbnail': thumbnail 'thumbnail': thumbnail