diff options
author | Sergey M․ <dstftw@gmail.com> | 2015-08-05 20:36:37 +0600 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2015-08-05 20:36:37 +0600 |
commit | 251a44b776264c17d7799e017b856143c6cacd9a (patch) | |
tree | 0d252158a204c46a1d4c942bfb6c171cefd9415b /youtube_dl/extractor/xhamster.py | |
parent | be7a8379b47c35afe66abcc02aee597e5143b1d5 (diff) |
[xhamster] Fix thumbnail extraction
Diffstat (limited to 'youtube_dl/extractor/xhamster.py')
-rw-r--r-- | youtube_dl/extractor/xhamster.py | 5 |
1 files changed, 4 insertions, 1 deletions
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'<a href=\'/user/[^>]+>(?P<uploader_id>[^<]+)', webpage, 'uploader id', default='anonymous') - thumbnail = self._html_search_regex(r'<video\s+.*?poster="([^"]+)".*?>', webpage, 'thumbnail', fatal=False) + thumbnail = self._search_regex( + [r'''thumb\s*:\s*(?P<q>["'])(?P<thumbnail>.+?)(?P=q)''', + r'''<video[^>]+poster=(?P<q>["'])(?P<thumbnail>.+?)(?P=q)[^>]*>'''], + webpage, 'thumbnail', fatal=False, group='thumbnail') duration = parse_duration(self._html_search_regex(r'<span>Runtime:</span> (\d+:\d+)</div>', webpage, 'duration', fatal=False)) |