mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -04: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
@ -50,6 +50,13 @@ class Nature(BasicNewsRecipe):
|
|||||||
self.cover_url = 'https:' + soup.find(
|
self.cover_url = 'https:' + soup.find(
|
||||||
'img', attrs={'data-test': check_words('issue-cover-image')}
|
'img', attrs={'data-test': check_words('issue-cover-image')}
|
||||||
)['src']
|
)['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(
|
section_tags = soup.find(
|
||||||
'div', {'data-container-type': check_words('issue-section-list')}
|
'div', {'data-container-type': check_words('issue-section-list')}
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user