mirror of
https://codeberg.org/polarisfm/youtube-dl
synced 2024-11-29 19:47:54 +01:00
Get higher resolution thumbnails
This commit is contained in:
parent
7edef53b48
commit
fdaae7c2a4
@ -48,15 +48,14 @@ class BoundHubIE(InfoExtractor):
|
|||||||
|
|
||||||
# Get screenshots
|
# Get screenshots
|
||||||
html_screenshots = self._search_regex(r'<div\s*class=[\"\']block-screenshots[\"\']>([\s\S]+?)</div>', webpage, 'html_screenshots', fatal=False)
|
html_screenshots = self._search_regex(r'<div\s*class=[\"\']block-screenshots[\"\']>([\s\S]+?)</div>', webpage, 'html_screenshots', fatal=False)
|
||||||
regex_screenshots = r'<img\s*class=[\"\'][^\"\']*[\"\']\s*src=[\"\'][^\"\']*[\"\']\s*data-original=[\"\']([^\"\']*)[\"\']\s*width=[\"\']([^\"\']*)[\"\']\s*height=[\"\']([^\"\']*)[\"\']>'
|
regex_screenshots = r'<a href=[\"\']([^\"\']*)[\"\']'
|
||||||
|
|
||||||
thumbnails = list()
|
thumbnails = list()
|
||||||
|
|
||||||
for match in re.findall(regex_screenshots, html_screenshots):
|
for match in re.findall(regex_screenshots, html_screenshots):
|
||||||
img = dict()
|
img = dict()
|
||||||
img['url'] = match[0]
|
img['url'] = match.rstrip('/')
|
||||||
img['id'] = int_or_none(os.path.splitext(os.path.basename(img['url']))[0])
|
img['id'] = int_or_none(os.path.splitext(os.path.basename(img['url']))[0])
|
||||||
img['width'] = int_or_none(match[1])
|
|
||||||
img['height'] = int_or_none(match[2])
|
|
||||||
thumbnails.append(img)
|
thumbnails.append(img)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
Loading…
Reference in New Issue
Block a user