mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-27 15:25:44 +01:00
Make the article images slightly larger
This commit is contained in:
parent
28848cf705
commit
aeb24eb356
1 changed files with 2 additions and 1 deletions
|
|
@ -85,5 +85,6 @@ def preprocess_html(self, soup):
|
|||
for img in soup.findAll('div', attrs={'data-js': 'LazyImage'}):
|
||||
img['style'] = ''
|
||||
img.name = 'img'
|
||||
img['src'] = img['data-srcset'].split()[0]
|
||||
srcs = [x.split(' ')[0].strip() for x in img['data-srcset'].split(',')]
|
||||
img['src'] = srcs[1 if len(srcs) > 0 else 0]
|
||||
return soup
|
||||
|
|
|
|||
Loading…
Reference in a new issue