mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Better cover image for Foreign Affairs recipe
This commit is contained in:
parent
637b561aa2
commit
9523c4ce1c
@ -151,7 +151,8 @@ class ForeignAffairsRecipe(BasicNewsRecipe):
|
|||||||
self.timefmt = u' [%s]' % date
|
self.timefmt = u' [%s]' % date
|
||||||
link = soup.find('link', rel='revision', href=True)['href']
|
link = soup.find('link', rel='revision', href=True)['href']
|
||||||
year, volnum, issue_vol = link.split('/')[-3:]
|
year, volnum, issue_vol = link.split('/')[-3:]
|
||||||
self.cover_url = soup.find('meta', property="og:image:secure_url")['content']
|
self.cover_url = (soup.find('img', {'class': 'subscribe-callout-image'})['data-src']
|
||||||
|
.split("|", 1)[0].replace('issue_small_1x', 'issue_large_2x'))
|
||||||
|
|
||||||
cls = soup.find('body')['class']
|
cls = soup.find('body')['class']
|
||||||
if isinstance(cls, (list, tuple)):
|
if isinstance(cls, (list, tuple)):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user