aboutsummaryrefslogtreecommitdiffstats
path: root/youtube_dl/extractor/wdr.py
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2014-05-12 22:17:19 +0200
committerPhilipp Hagemeister <phihag@phihag.de>2014-05-12 22:17:19 +0200
commite4cbb5f3826b6c70a22e8a8343c000a1e918cc73 (patch)
tree3085d1f9d02f20e61506f9cfb988244e7bc51f6c /youtube_dl/extractor/wdr.py
parentc1bce22f23811bf54420dd39e23cce3acc545016 (diff)
downloadyoutube-dl-e4cbb5f3826b6c70a22e8a8343c000a1e918cc73.zip
youtube-dl-e4cbb5f3826b6c70a22e8a8343c000a1e918cc73.tar.gz
youtube-dl-e4cbb5f3826b6c70a22e8a8343c000a1e918cc73.tar.bz2
[wdr] Add support for mobile URLs
Diffstat (limited to 'youtube_dl/extractor/wdr.py')
-rw-r--r--youtube_dl/extractor/wdr.py28
1 files changed, 28 insertions, 0 deletions
diff --git a/youtube_dl/extractor/wdr.py b/youtube_dl/extractor/wdr.py
index 63691aa..feeb44b 100644
--- a/youtube_dl/extractor/wdr.py
+++ b/youtube_dl/extractor/wdr.py
@@ -115,6 +115,34 @@ class WDRIE(InfoExtractor):
}
+class WDRMobileIE(InfoExtractor):
+ _VALID_URL = r'''(?x)
+ https?://mobile-ondemand\.wdr\.de/
+ .*?/fsk(?P<age_limit>[0-9]+)
+ /[0-9]+/[0-9]+/
+ (?P<id>[0-9]+)_(?P<title>[0-9]+)'''
+ IE_NAME = 'wdr:mobile'
+ _TEST = {
+ 'url': 'http://mobile-ondemand.wdr.de/CMS2010/mdb/ondemand/weltweit/fsk0/42/421735/421735_4283021.mp4',
+ 'info_dict': {
+ 'title': '4283021',
+ 'id': '421735',
+ 'age_limit': 0,
+ },
+ '_skip': 'Will be depublicized shortly'
+ }
+
+ def _real_extract(self, url):
+ mobj = re.match(self._VALID_URL, url)
+ return {
+ 'id': mobj.group('id'),
+ 'title': mobj.group('title'),
+ 'age_limit': int(mobj.group('age_limit')),
+ 'url': url,
+ 'user_agent': 'mobile',
+ }
+
+
class WDRMausIE(InfoExtractor):
_VALID_URL = 'http://(?:www\.)?wdrmaus\.de/(?:[^/]+/){,2}(?P<id>[^/?#]+)(?:/index\.php5|(?<!index)\.php5|/(?:$|[?#]))'
IE_DESC = 'Sendung mit der Maus'