aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/phoenix.py
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2014-10-27 02:43:59 +0100
committerPhilipp Hagemeister <phihag@phihag.de>2014-10-27 02:43:59 +0100
commit8cc3eba79ae19cf5ec4780356b75ccb9813916f0 (patch)
tree34d9adc88e0dd73ab25a7f857504176e70e168b5 /youtube_dl/extractor/phoenix.py
parentb0fb6d4db1ed19dfa3a38ee5fd1d38e6227c3d93 (diff)
[phoenix] Add new extractor (Fixes #4036)
Diffstat (limited to 'youtube_dl/extractor/phoenix.py')
-rw-r--r--youtube_dl/extractor/phoenix.py31
1 files changed, 31 insertions, 0 deletions
diff --git a/youtube_dl/extractor/phoenix.py b/youtube_dl/extractor/phoenix.py
new file mode 100644
index 000000000..a20672c0c
--- /dev/null
+++ b/youtube_dl/extractor/phoenix.py
@@ -0,0 +1,31 @@
+from __future__ import unicode_literals
+
+from .common import InfoExtractor
+from .zdf import extract_from_xml_url
+
+
+class PhoenixIE(InfoExtractor):
+ _VALID_URL = r'https?://(?:www\.)?phoenix\.de/content/(?P<id>[0-9]+)'
+ _TEST = {
+ 'url': 'http://www.phoenix.de/content/884301',
+ 'md5': 'ed249f045256150c92e72dbb70eadec6',
+ 'info_dict': {
+ 'id': '884301',
+ 'ext': 'mp4',
+ 'title': 'Michael Krons mit Hans-Werner Sinn',
+ 'description': 'Im Dialog - Sa. 25.10.14, 00.00 - 00.35 Uhr',
+ 'upload_date': '20141025',
+ 'uploader': 'Im Dialog',
+ }
+ }
+
+ def _real_extract(self, url):
+ video_id = self._match_id(url)
+ webpage = self._download_webpage(url, video_id)
+
+ internal_id = self._search_regex(
+ r'<div class="phx_vod" id="phx_vod_([0-9]+)"',
+ webpage, 'internal video ID')
+
+ api_url = 'http://www.phoenix.de/php/zdfplayer-v1.3/data/beitragsDetails.php?ak=web&id=%s' % internal_id
+ return extract_from_xml_url(self, video_id, api_url)