2014-12-21 04:26:47 -07:00
|
|
|
import re
|
2014-12-21 03:01:28 -07:00
|
|
|
|
|
|
|
from .common import InfoExtractor
|
2014-12-25 10:26:57 -07:00
|
|
|
from ..utils import unified_strdate
|
2014-12-21 03:01:28 -07:00
|
|
|
|
|
|
|
|
|
|
|
class TeleTaskIE(InfoExtractor):
|
2024-03-08 17:02:45 -07:00
|
|
|
_WORKING = False
|
2014-12-25 10:26:57 -07:00
|
|
|
_VALID_URL = r'https?://(?:www\.)?tele-task\.de/archive/video/html5/(?P<id>[0-9]+)'
|
2014-12-21 03:01:28 -07:00
|
|
|
_TEST = {
|
2014-12-21 04:26:47 -07:00
|
|
|
'url': 'http://www.tele-task.de/archive/video/html5/26168/',
|
2014-12-21 03:01:28 -07:00
|
|
|
'info_dict': {
|
2015-02-01 07:25:33 -07:00
|
|
|
'id': '26168',
|
2014-12-21 03:01:28 -07:00
|
|
|
'title': 'Duplicate Detection',
|
2014-12-21 04:26:47 -07:00
|
|
|
},
|
|
|
|
'playlist': [{
|
|
|
|
'md5': '290ef69fb2792e481169c3958dbfbd57',
|
|
|
|
'info_dict': {
|
2014-12-25 10:26:57 -07:00
|
|
|
'id': '26168-speaker',
|
|
|
|
'ext': 'mp4',
|
2014-12-21 04:26:47 -07:00
|
|
|
'title': 'Duplicate Detection',
|
|
|
|
'upload_date': '20141218',
|
2024-06-11 17:09:58 -06:00
|
|
|
},
|
2014-12-25 10:26:57 -07:00
|
|
|
}, {
|
2014-12-21 04:26:47 -07:00
|
|
|
'md5': 'e1e7218c5f0e4790015a437fcf6c71b4',
|
|
|
|
'info_dict': {
|
2014-12-25 10:26:57 -07:00
|
|
|
'id': '26168-slides',
|
|
|
|
'ext': 'mp4',
|
2014-12-21 04:26:47 -07:00
|
|
|
'title': 'Duplicate Detection',
|
|
|
|
'upload_date': '20141218',
|
2024-06-11 17:09:58 -06:00
|
|
|
},
|
|
|
|
}],
|
2014-12-21 03:01:28 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
def _real_extract(self, url):
|
2014-12-21 04:26:47 -07:00
|
|
|
lecture_id = self._match_id(url)
|
|
|
|
webpage = self._download_webpage(url, lecture_id)
|
|
|
|
|
2014-12-21 03:01:28 -07:00
|
|
|
title = self._html_search_regex(
|
2014-12-25 10:26:57 -07:00
|
|
|
r'itemprop="name">([^<]+)</a>', webpage, 'title')
|
|
|
|
upload_date = unified_strdate(self._html_search_regex(
|
|
|
|
r'Date:</td><td>([^<]+)</td>', webpage, 'date', fatal=False))
|
2014-12-21 03:01:28 -07:00
|
|
|
|
2014-12-21 04:26:47 -07:00
|
|
|
entries = [{
|
2024-06-11 17:09:58 -06:00
|
|
|
'id': f'{lecture_id}-{format_id}',
|
2014-12-25 10:26:57 -07:00
|
|
|
'url': video_url,
|
2014-12-21 04:26:47 -07:00
|
|
|
'title': title,
|
2014-12-25 10:26:57 -07:00
|
|
|
'upload_date': upload_date,
|
|
|
|
} for format_id, video_url in re.findall(
|
|
|
|
r'<video class="([^"]+)"[^>]*>\s*<source src="([^"]+)"', webpage)]
|
2014-12-21 03:01:28 -07:00
|
|
|
|
2014-12-25 10:26:57 -07:00
|
|
|
return self.playlist_result(entries, lecture_id, title)
|