From e0bb97aba76c13ae0e8b63092560ab7cb96b4bae Mon Sep 17 00:00:00 2001 From: Hier631 <34473369+Hier631@users.noreply.github.com> Date: Fri, 15 Dec 2017 19:11:44 +0100 Subject: [PATCH] Fix for Heise extractor --- youtube_dl/extractor/heise.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/youtube_dl/extractor/heise.py b/youtube_dl/extractor/heise.py index 82e11a7d8..2012baa62 100644 --- a/youtube_dl/extractor/heise.py +++ b/youtube_dl/extractor/heise.py @@ -12,7 +12,7 @@ from ..utils import ( class HeiseIE(InfoExtractor): - _VALID_URL = r'https?://(?:www\.)?heise\.de/(?:[^/]+/)+[^/]+-(?P[0-9]+)\.html' + _VALID_URL = r'https?://(?:www\.|m\.)?heise\.de/(?:[^/]+/)+[^/]+-(?P[0-9]+)\.html' _TESTS = [{ 'url': 'http://www.heise.de/video/artikel/Podcast-c-t-uplink-3-3-Owncloud-Tastaturen-Peilsender-Smartphone-2404147.html', 'md5': 'ffed432483e922e88545ad9f2f15d30e', @@ -54,6 +54,7 @@ class HeiseIE(InfoExtractor): }] def _real_extract(self, url): + url = url.replace('www', 'm', 1) video_id = self._match_id(url) webpage = self._download_webpage(url, video_id) @@ -97,7 +98,7 @@ class HeiseIE(InfoExtractor): description = self._og_search_description( webpage, default=None) or self._html_search_meta( - 'description', webpage) + 'description', webpage, default=None) return { 'id': video_id, @@ -106,6 +107,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)), + self._html_search_meta('date', webpage, default=None)), 'formats': formats, }