mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-04-21 01:34:27 +02:00
enlarge cover img resolution by change the url
kindle app on larger tablets does not show cover if the cover img resolution is too low.
This commit is contained in:
parent
b3e1632b07
commit
f6c9cde09f
1 changed files with 7 additions and 0 deletions
|
|
@ -50,6 +50,13 @@ def parse_index(self):
|
|||
self.cover_url = 'https:' + soup.find(
|
||||
'img', attrs={'data-test': check_words('issue-cover-image')}
|
||||
)['src']
|
||||
try:
|
||||
self.cover_url = self.cover_url.replace("w200","w500") # enlarge cover size resolution
|
||||
except:
|
||||
"""
|
||||
failed, img src might have changed, use default width 200
|
||||
"""
|
||||
pass
|
||||
section_tags = soup.find(
|
||||
'div', {'data-container-type': check_words('issue-section-list')}
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue