You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
1.1 KiB

  1. from __future__ import unicode_literals
  2. from .common import InfoExtractor
  3. from .zdf import extract_from_xml_url
  4. class PhoenixIE(InfoExtractor):
  5. _VALID_URL = r'https?://(?:www\.)?phoenix\.de/content/(?P<id>[0-9]+)'
  6. _TEST = {
  7. 'url': 'http://www.phoenix.de/content/884301',
  8. 'md5': 'ed249f045256150c92e72dbb70eadec6',
  9. 'info_dict': {
  10. 'id': '884301',
  11. 'ext': 'mp4',
  12. 'title': 'Michael Krons mit Hans-Werner Sinn',
  13. 'description': 'Im Dialog - Sa. 25.10.14, 00.00 - 00.35 Uhr',
  14. 'upload_date': '20141025',
  15. 'uploader': 'Im Dialog',
  16. }
  17. }
  18. def _real_extract(self, url):
  19. video_id = self._match_id(url)
  20. webpage = self._download_webpage(url, video_id)
  21. internal_id = self._search_regex(
  22. r'<div class="phx_vod" id="phx_vod_([0-9]+)"',
  23. webpage, 'internal video ID')
  24. api_url = 'http://www.phoenix.de/php/zdfplayer-v1.3/data/beitragsDetails.php?ak=web&id=%s' % internal_id
  25. return extract_from_xml_url(self, video_id, api_url)