mirror of
https://github.com/l1ving/youtube-dl
synced 2025-01-24 07:02:54 +08:00
Updated fix for Heise extractor
This commit is contained in:
parent
7420fc5230
commit
4b1aead092
@ -58,7 +58,8 @@ class HeiseIE(InfoExtractor):
|
|||||||
def _real_extract(self, url):
|
def _real_extract(self, url):
|
||||||
mobile_url = re.sub(r'^(https?://)(?:www\.)?', r'\1m.', url)
|
mobile_url = re.sub(r'^(https?://)(?:www\.)?', r'\1m.', url)
|
||||||
video_id = self._match_id(mobile_url)
|
video_id = self._match_id(mobile_url)
|
||||||
webpage = self._download_webpage(mobile_url, video_id)
|
webpage = self._download_webpage(url, video_id)
|
||||||
|
mobile_webpage = self._download_webpage(mobile_url, video_id)
|
||||||
|
|
||||||
title = self._html_search_meta('fulltitle', webpage, default=None)
|
title = self._html_search_meta('fulltitle', webpage, default=None)
|
||||||
if not title or title == "c't":
|
if not title or title == "c't":
|
||||||
@ -72,10 +73,10 @@ class HeiseIE(InfoExtractor):
|
|||||||
|
|
||||||
container_id = self._search_regex(
|
container_id = self._search_regex(
|
||||||
r'<div class="videoplayerjw"[^>]+data-container="([0-9]+)"',
|
r'<div class="videoplayerjw"[^>]+data-container="([0-9]+)"',
|
||||||
webpage, 'container ID')
|
mobile_webpage, 'container ID')
|
||||||
sequenz_id = self._search_regex(
|
sequenz_id = self._search_regex(
|
||||||
r'<div class="videoplayerjw"[^>]+data-sequenz="([0-9]+)"',
|
r'<div class="videoplayerjw"[^>]+data-sequenz="([0-9]+)"',
|
||||||
webpage, 'sequenz ID')
|
mobile_webpage, 'sequenz ID')
|
||||||
|
|
||||||
doc = self._download_xml(
|
doc = self._download_xml(
|
||||||
'http://www.heise.de/videout/feed', video_id, query={
|
'http://www.heise.de/videout/feed', video_id, query={
|
||||||
@ -100,7 +101,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, default=None)
|
'description', webpage)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'id': video_id,
|
'id': video_id,
|
||||||
@ -109,6 +110,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, default=None)),
|
self._html_search_meta('date', webpage)),
|
||||||
'formats': formats,
|
'formats': formats,
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user