mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
Fix Nature cover resolution
This commit is contained in:
parent
d17c1c6ce8
commit
d6e1365432
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user