1 from __future__ import unicode_literals
5 from .common import InfoExtractor
8 class DFBIE(InfoExtractor):
10 _VALID_URL = r'https?://tv\.dfb\.de/video/[^/]+/(?P<id>\d+)'
13 'url': 'http://tv.dfb.de/video/highlights-des-empfangs-in-berlin/9070/',
14 # The md5 is different each time
18 'title': 'Highlights des Empfangs in Berlin',
19 'upload_date': '20140716',
23 def _real_extract(self, url):
24 mobj = re.match(self._VALID_URL, url)
25 video_id = mobj.group('id')
27 webpage = self._download_webpage(url, video_id)
28 player_info = self._download_xml(
29 'http://tv.dfb.de/server/hd_video.php?play=%s' % video_id,
31 video_info = player_info.find('video')
33 f4m_info = self._download_xml(video_info.find('url').text, video_id)
34 token_el = f4m_info.find('token')
35 manifest_url = token_el.attrib['url'] + '?' + 'hdnea=' + token_el.attrib['auth'] + '&hdcore=3.2.0'
39 'title': video_info.find('title').text,
42 'thumbnail': self._og_search_thumbnail(webpage),
43 'upload_date': ''.join(video_info.find('time_date').text.split('.')[::-1]),