Merge branch 'enlarge_nature_cover' of https://github.com/jn8029/calibre

This commit is contained in:
Kovid Goyal 2019-07-30 14:29:28 +05:30
commit 78b2f586ac
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -50,6 +50,13 @@ class Nature(BasicNewsRecipe):
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')}
)