From bf0ff93277ba36fbda70223ca7e78b5132e54ddf Mon Sep 17 00:00:00 2001 From: Philipp Hagemeister Date: Sat, 13 Sep 2014 09:09:55 +0200 Subject: [ard] Make more robust against missing thumbnails I cannot reproduce this error, it's from travis. --- youtube_dl/extractor/ard.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'youtube_dl/extractor/ard.py') diff --git a/youtube_dl/extractor/ard.py b/youtube_dl/extractor/ard.py index ef94c7239..12457f0f9 100644 --- a/youtube_dl/extractor/ard.py +++ b/youtube_dl/extractor/ard.py @@ -13,6 +13,7 @@ from ..utils import ( int_or_none, parse_duration, unified_strdate, + xpath_text, ) @@ -157,8 +158,9 @@ class ARDIE(InfoExtractor): player_url = mobj.group('mainurl') + '~playerXml.xml' doc = self._download_xml(player_url, display_id) video_node = doc.find('./video') - upload_date = unified_strdate(video_node.find('./broadcastDate').text) - thumbnail = video_node.find('.//teaserImage//variant/url').text + upload_date = unified_strdate(xpath_text( + video_node, './broadcastDate')) + thumbnail = xpath_text(video_node, './/teaserImage//variant/url') formats = [] for a in video_node.findall('.//asset'): -- cgit v1.2.3 From dc9f3568461a26e1306416ef5ea1ecdf4e9420b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergey=20M=E2=80=A4?= Date: Tue, 16 Sep 2014 18:47:06 +0700 Subject: [ard] Remove URL path escaping This is now implemented generic in YoutubeDL.urlopen --- youtube_dl/extractor/ard.py | 3 --- 1 file changed, 3 deletions(-) (limited to 'youtube_dl/extractor/ard.py') diff --git a/youtube_dl/extractor/ard.py b/youtube_dl/extractor/ard.py index 12457f0f9..54cec1c2f 100644 --- a/youtube_dl/extractor/ard.py +++ b/youtube_dl/extractor/ard.py @@ -51,9 +51,6 @@ class ARDMediathekIE(InfoExtractor): else: video_id = m.group('video_id') - urlp = compat_urllib_parse_urlparse(url) - url = urlp._replace(path=compat_urllib_parse.quote(urlp.path.encode('utf-8'))).geturl() - webpage = self._download_webpage(url, video_id) if '>Der gewünschte Beitrag ist nicht mehr verfügbar.<' in webpage: -- cgit v1.2.3