[PublicSenat] add new extractor

This commit is contained in:
Jonathan Nifenecker 2016-02-12 00:23:56 +01:00
parent f817d9bec1
commit 95721d3662
2 changed files with 38 additions and 0 deletions

View File

@ -553,6 +553,7 @@ from .pornoxo import PornoXOIE
from .primesharetv import PrimeShareTVIE
from .promptfile import PromptFileIE
from .prosiebensat1 import ProSiebenSat1IE
from .publicsenat import PublicSenatIE
from .puls4 import Puls4IE
from .pyvideo import PyvideoIE
from .qqmusic import (

View File

@ -0,0 +1,37 @@
# coding: utf-8
from __future__ import unicode_literals
from .common import InfoExtractor
class PublicSenatIE(InfoExtractor):
IE_NAME = 'Publicsenat.fr'
IE_DESC = 'Public Senat extractor'
_VALID_URL = r'(https?://|www.)+replay\.publicsenat\.fr(/.*/(?P<id>[0-9]*)(#.*)?)?'
_TEST = {
'url': 'http://replay.publicsenat.fr/vod/documentaire/a-la-recherche-de-bernard-maris,-l-anti-economiste/192668#videosPV',
'md5': 'fa1902d5b4f28a304d293f4c4d296fb9',
'info_dict': {
'ext': 'mp4',
'title': 'Documentaire : A la recherche de Bernard Maris',
'id': 'k7GE6aZIlHHPdieDh7w',
'upload_date': '20160104',
'uploader': 'Public Sénat',
'description': 'md5:463fa20248134567e1125bc805f1b905',
'uploader_id': 'xa9gza',
'timestamp': 1451931617,
}
}
def _real_extract(self, url):
video_id = self._match_id(url)
webpage = self._download_webpage(url, video_id)
# the video are hosted on dailymotion.com
url = self._html_search_regex(r'<input.*value="(?P<url>.*dailymotion.*)"', webpage, 'url')
return {
'url': url,
'_type': 'url',
'ie_key': 'Dailymotion',
}