]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/teletask.py
e54145105f45d6b15345b47f101fe7f804ec174d
1 from __future__
import unicode_literals
5 from .common
import InfoExtractor
6 from ..utils
import unified_strdate
9 class TeleTaskIE(InfoExtractor
):
10 _VALID_URL
= r
'https?://(?:www\.)?tele-task\.de/archive/video/html5/(?P<id>[0-9]+)'
12 'url': 'http://www.tele-task.de/archive/video/html5/26168/',
14 'title': 'Duplicate Detection',
17 'md5': '290ef69fb2792e481169c3958dbfbd57',
19 'id': '26168-speaker',
21 'title': 'Duplicate Detection',
22 'upload_date': '20141218',
25 'md5': 'e1e7218c5f0e4790015a437fcf6c71b4',
29 'title': 'Duplicate Detection',
30 'upload_date': '20141218',
35 def _real_extract(self
, url
):
36 lecture_id
= self
._match
_id
(url
)
38 webpage
= self
._download
_webpage
(url
, lecture_id
)
40 title
= self
._html
_search
_regex
(
41 r
'itemprop="name">([^<]+)</a>', webpage
, 'title')
42 upload_date
= unified_strdate(self
._html
_search
_regex
(
43 r
'Date:</td><td>([^<]+)</td>', webpage
, 'date', fatal
=False))
46 'id': '%s-%s' % (lecture_id
, format_id
),
49 'upload_date': upload_date
,
50 } for format_id
, video_url
in re
.findall(
51 r
'<video class="([^"]+)"[^>]*>\s*<source src="([^"]+)"', webpage
)]
53 return self
.playlist_result(entries
, lecture_id
, title
)