projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
be7a837
)
[xhamster] Fix thumbnail extraction
author
Sergey M․
<dstftw@gmail.com>
Wed, 5 Aug 2015 14:36:37 +0000
(20:36 +0600)
committer
Sergey M․
<dstftw@gmail.com>
Wed, 5 Aug 2015 14:36:37 +0000
(20:36 +0600)
youtube_dl/extractor/xhamster.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/xhamster.py
b/youtube_dl/extractor/xhamster.py
index 481d79b89e80e3e529ae9b4109019c8185bf5d43..b57e7c813680bfe9cf4def0c85665c11be07c986 100644
(file)
--- 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')
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))
duration = parse_duration(self._html_search_regex(r'<span>Runtime:</span> (\d+:\d+)</div>',
webpage, 'duration', fatal=False))