mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-11-22 10:11:52 +00:00
fix test and remove lengthy description
This commit is contained in:
parent
ee45625290
commit
3f7421b71b
1 changed files with 2 additions and 18 deletions
|
@ -11,18 +11,12 @@ class TeleTaskIE(InfoExtractor):
|
||||||
_VALID_URL = r'http?://(?:www\.)?tele-task\.de/archive/video/html5/(?P<id>[0-9]+)/'
|
_VALID_URL = r'http?://(?:www\.)?tele-task\.de/archive/video/html5/(?P<id>[0-9]+)/'
|
||||||
_TEST = {
|
_TEST = {
|
||||||
'url': 'http://www.tele-task.de/archive/video/html5/26168/',
|
'url': 'http://www.tele-task.de/archive/video/html5/26168/',
|
||||||
'md5': 'TODO: md5 sum of the first 10241 bytes of the video file (use --test)',
|
'md5': '290ef69fb2792e481169c3958dbfbd57',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
'id': '26168',
|
'id': '26168',
|
||||||
'ext': 'mp4',
|
'ext': 'mp4',
|
||||||
'title': 'Duplicate Detection',
|
'title': 'Duplicate Detection',
|
||||||
'thumbnail': 're:^https?://.*\.jpg$',
|
'upload_date': '20141218',
|
||||||
'date': '20141218',
|
|
||||||
# TODO more properties, either as:
|
|
||||||
# * A value
|
|
||||||
# * MD5 checksum; start the string with md5:
|
|
||||||
# * A regular expression; start the string with re:
|
|
||||||
# * Any Python type (for example int or float)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,19 +24,10 @@ class TeleTaskIE(InfoExtractor):
|
||||||
video_id = self._match_id(url)
|
video_id = self._match_id(url)
|
||||||
webpage = self._download_webpage(url, video_id)
|
webpage = self._download_webpage(url, video_id)
|
||||||
|
|
||||||
lecture_url = self._html_search_regex(
|
|
||||||
r'href="([^"]+)" itemprop="name">', webpage, 'title')
|
|
||||||
lecture_id = re.search("([0-9]+)/",lecture_url).group(1)
|
|
||||||
overview_page = self._download_webpage("http://www.tele-task.de" + lecture_url,
|
|
||||||
lecture_id)
|
|
||||||
|
|
||||||
title = self._html_search_regex(
|
title = self._html_search_regex(
|
||||||
r'itemprop="name">([^"]+)</a>', webpage, 'title')
|
r'itemprop="name">([^"]+)</a>', webpage, 'title')
|
||||||
url = self._html_search_regex(
|
url = self._html_search_regex(
|
||||||
r'class="speaker".*?src="([^"]+)"', webpage, 'video_url', flags=re.DOTALL)
|
r'class="speaker".*?src="([^"]+)"', webpage, 'video_url', flags=re.DOTALL)
|
||||||
description = self._html_search_regex(
|
|
||||||
r'Description of the series:</p>([^"]+)</div>', overview_page,
|
|
||||||
'description',flags=re.DOTALL)
|
|
||||||
|
|
||||||
date = self._html_search_regex(
|
date = self._html_search_regex(
|
||||||
r'<td class="label">Date:</td><td>([^"]+)</td>', webpage, 'date')
|
r'<td class="label">Date:</td><td>([^"]+)</td>', webpage, 'date')
|
||||||
|
@ -53,7 +38,6 @@ class TeleTaskIE(InfoExtractor):
|
||||||
return {
|
return {
|
||||||
'id': video_id,
|
'id': video_id,
|
||||||
'title': title,
|
'title': title,
|
||||||
'description': description,
|
|
||||||
'url': url,
|
'url': url,
|
||||||
'upload_date': date,
|
'upload_date': date,
|
||||||
}
|
}
|
Loading…
Reference in a new issue