From: felix Date: Sat, 11 Jul 2015 16:56:07 +0000 (+0200) Subject: [rdsca] New extractor X-Git-Url: http://git.oshgnacknak.de/?a=commitdiff_plain;h=ac8f97f2b37115bf81a653360819b5d30eebda18;p=youtube-dl [rdsca] New extractor --- diff --git a/youtube_dl/extractor/__init__.py b/youtube_dl/extractor/__init__.py index cbaa07391..73fa0e4ed 100644 --- a/youtube_dl/extractor/__init__.py +++ b/youtube_dl/extractor/__init__.py @@ -460,6 +460,7 @@ from .radiobremen import RadioBremenIE from .radiofrance import RadioFranceIE from .rai import RaiIE from .rbmaradio import RBMARadioIE +from .rdsca import RDScaIE from .redtube import RedTubeIE from .restudy import RestudyIE from .reverbnation import ReverbNationIE diff --git a/youtube_dl/extractor/rdsca.py b/youtube_dl/extractor/rdsca.py new file mode 100644 index 000000000..a8df927e4 --- /dev/null +++ b/youtube_dl/extractor/rdsca.py @@ -0,0 +1,50 @@ +# coding: utf-8 +from __future__ import unicode_literals + +from .common import InfoExtractor +from ..utils import ( + parse_iso8601, + url_basename, +) + + +class RDScaIE(InfoExtractor): + IE_NAME = 'RDS.ca' + _VALID_URL = r'http://(?:www\.)?rds\.ca/videos/(?P.*)' + + _TESTS = [{ + 'url': 'http://www.rds.ca/videos/football/nfl/fowler-jr-prend-la-direction-de-jacksonville-3.1132799', + 'info_dict': { + "ext": "mp4", + "title": "Fowler Jr. prend la direction de Jacksonville", + "description": "Dante Fowler Jr. est le troisième choix du repêchage 2015 de la NFL. ", + "timestamp": 1430397346, + } + }] + + def _real_extract(self, url): + video_id = url_basename(url) + + webpage = self._download_webpage(url, video_id) + + title = self._search_regex( + r']*>([^\n]*)', webpage, 'video title', default=None) + video_url = self._search_regex( + r']*>([^\n]*)', webpage, 'description', default=None) + thumbnail = self._search_regex( + r'