1
0
mirror of https://github.com/l1ving/youtube-dl synced 2025-01-24 07:26:05 +08:00

Updated fix for Heise extractor

This commit is contained in:
Hier631 2017-12-20 21:44:53 +01:00 committed by GitHub
parent 7420fc5230
commit 4b1aead092
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -58,7 +58,8 @@ class HeiseIE(InfoExtractor):
def _real_extract(self, url):
mobile_url = re.sub(r'^(https?://)(?:www\.)?', r'\1m.', 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)
if not title or title == "c't":
@ -72,10 +73,10 @@ class HeiseIE(InfoExtractor):
container_id = self._search_regex(
r'<div class="videoplayerjw"[^>]+data-container="([0-9]+)"',
webpage, 'container ID')
mobile_webpage, 'container ID')
sequenz_id = self._search_regex(
r'<div class="videoplayerjw"[^>]+data-sequenz="([0-9]+)"',
webpage, 'sequenz ID')
mobile_webpage, 'sequenz ID')
doc = self._download_xml(
'http://www.heise.de/videout/feed', video_id, query={
@ -100,7 +101,7 @@ class HeiseIE(InfoExtractor):
description = self._og_search_description(
webpage, default=None) or self._html_search_meta(
'description', webpage, default=None)
'description', webpage)
return {
'id': video_id,
@ -109,6 +110,6 @@ class HeiseIE(InfoExtractor):
'thumbnail': (xpath_text(doc, './/{http://rss.jwpcdn.com/}image') or
self._og_search_thumbnail(webpage)),
'timestamp': parse_iso8601(
self._html_search_meta('date', webpage, default=None)),
self._html_search_meta('date', webpage)),
'formats': formats,
}