This commit is contained in:
Pierre Rudloff 2013-09-08 21:55:11 +02:00
parent 08523ee20a
commit 79a068c4a7
2 changed files with 36 additions and 0 deletions

View File

@ -61,6 +61,7 @@ from .nba import NBAIE
from .nbc import NBCNewsIE
from .ooyala import OoyalaIE
from .orf import ORFIE
from .pluzz import PluzzIE
from .pbs import PBSIE
from .photobucket import PhotobucketIE
from .pornotube import PornotubeIE

View File

@ -0,0 +1,35 @@
import re
from .common import InfoExtractor
class PluzzIE(InfoExtractor):
_IE_NAME = 'canalc2.tv'
_VALID_URL = r'http://pluzz\.francetv\.fr/videos/(.*?)\.html'
_TEST = {
u'url': u'http://pluzz.francetv.fr/videos/doctor_who.html',
u'file': u'12163.mp4',
u'md5': u'060158428b650f896c542dfbb3d6487f'
}
def _real_extract(self, url):
title = re.match(self._VALID_URL, url).group(1)
webpage = self._download_webpage(url, title)
thumbnail = self._search_regex(
r'itemprop="thumbnailUrl" content="(.*?)"', webpage, 'thumbnail')
video_id = self._search_regex(
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')
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')
return {'id': video_id,
'ext': 'f4m',
'url': video_url,
'title': title,
'thumbnail': thumbnail
}