This commit is contained in:
Kovid Goyal 2023-01-23 17:56:23 +05:30
commit 75d2887dbb
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -1,5 +1,5 @@
#!/usr/bin/env python
import re
from collections import defaultdict
from calibre.web.feeds.news import BasicNewsRecipe, classes
@ -55,7 +55,7 @@ class Nature(BasicNewsRecipe):
'img', attrs={'data-test': check_words('issue-cover-image')}
)['src']
try:
self.cover_url = self.cover_url.replace("w200", "w500") # enlarge cover size resolution
self.cover_url = re.sub(r"\bw\d+\b", "w1000", self.cover_url) # enlarge cover size resolution
except:
"""
failed, img src might have changed, use default width 200