mirror of
https://github.com/l1ving/youtube-dl
synced 2025-02-03 06:12:57 +08:00
Fix for Heise extractor
This commit is contained in:
parent
498a8a4ca5
commit
e0bb97aba7
@ -12,7 +12,7 @@ from ..utils import (
|
|||||||
|
|
||||||
|
|
||||||
class HeiseIE(InfoExtractor):
|
class HeiseIE(InfoExtractor):
|
||||||
_VALID_URL = r'https?://(?:www\.)?heise\.de/(?:[^/]+/)+[^/]+-(?P<id>[0-9]+)\.html'
|
_VALID_URL = r'https?://(?:www\.|m\.)?heise\.de/(?:[^/]+/)+[^/]+-(?P<id>[0-9]+)\.html'
|
||||||
_TESTS = [{
|
_TESTS = [{
|
||||||
'url': 'http://www.heise.de/video/artikel/Podcast-c-t-uplink-3-3-Owncloud-Tastaturen-Peilsender-Smartphone-2404147.html',
|
'url': 'http://www.heise.de/video/artikel/Podcast-c-t-uplink-3-3-Owncloud-Tastaturen-Peilsender-Smartphone-2404147.html',
|
||||||
'md5': 'ffed432483e922e88545ad9f2f15d30e',
|
'md5': 'ffed432483e922e88545ad9f2f15d30e',
|
||||||
@ -54,6 +54,7 @@ class HeiseIE(InfoExtractor):
|
|||||||
}]
|
}]
|
||||||
|
|
||||||
def _real_extract(self, url):
|
def _real_extract(self, url):
|
||||||
|
url = url.replace('www', 'm', 1)
|
||||||
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)
|
||||||
|
|
||||||
@ -97,7 +98,7 @@ class HeiseIE(InfoExtractor):
|
|||||||
|
|
||||||
description = self._og_search_description(
|
description = self._og_search_description(
|
||||||
webpage, default=None) or self._html_search_meta(
|
webpage, default=None) or self._html_search_meta(
|
||||||
'description', webpage)
|
'description', webpage, default=None)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'id': video_id,
|
'id': video_id,
|
||||||
@ -106,6 +107,6 @@ class HeiseIE(InfoExtractor):
|
|||||||
'thumbnail': (xpath_text(doc, './/{http://rss.jwpcdn.com/}image') or
|
'thumbnail': (xpath_text(doc, './/{http://rss.jwpcdn.com/}image') or
|
||||||
self._og_search_thumbnail(webpage)),
|
self._og_search_thumbnail(webpage)),
|
||||||
'timestamp': parse_iso8601(
|
'timestamp': parse_iso8601(
|
||||||
self._html_search_meta('date', webpage)),
|
self._html_search_meta('date', webpage, default=None)),
|
||||||
'formats': formats,
|
'formats': formats,
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user