]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/dfb.py
8049779b0a31049f704bae256a3752a9a22ad789
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
(self
._proto
_relative
_url
(video_info
.find('url').text
.strip()), 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]),