From: Sergey M․ Date: Wed, 5 Aug 2015 14:36:37 +0000 (+0600) Subject: [xhamster] Fix thumbnail extraction X-Git-Url: http://git.oshgnacknak.de/?a=commitdiff_plain;h=251a44b776264c17d7799e017b856143c6cacd9a;p=youtube-dl [xhamster] Fix thumbnail extraction --- diff --git a/youtube_dl/extractor/xhamster.py b/youtube_dl/extractor/xhamster.py index 481d79b89..b57e7c813 100644 --- a/youtube_dl/extractor/xhamster.py +++ b/youtube_dl/extractor/xhamster.py @@ -78,7 +78,10 @@ class XHamsterIE(InfoExtractor): uploader_id = self._html_search_regex(r']+>(?P[^<]+)', webpage, 'uploader id', default='anonymous') - thumbnail = self._html_search_regex(r'', webpage, 'thumbnail', fatal=False) + thumbnail = self._search_regex( + [r'''thumb\s*:\s*(?P["'])(?P.+?)(?P=q)''', + r''']+poster=(?P["'])(?P.+?)(?P=q)[^>]*>'''], + webpage, 'thumbnail', fatal=False, group='thumbnail') duration = parse_duration(self._html_search_regex(r'Runtime: (\d+:\d+)', webpage, 'duration', fatal=False))