mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
fix economist cover and time magazine source link
This commit is contained in:
parent
e022decacf
commit
cf849e830c
@ -519,8 +519,7 @@ class Economist(BasicNewsRecipe):
|
||||
self.description = safe_dict(data, "props", "pageProps", "content", "headline")
|
||||
self.timefmt = ' [' + safe_dict(data, "props", "pageProps", "content", "formattedIssueDate") + ']'
|
||||
self.cover_url = safe_dict(data, "props", "pageProps", "content", "cover", "url").replace(
|
||||
'economist.com/', 'economist.com/cdn-cgi/image/width=960,quality=80,format=auto/'
|
||||
)
|
||||
'economist.com/', 'economist.com/cdn-cgi/image/width=960,quality=80,format=auto/').replace('SQ_', '')
|
||||
self.log('Got cover:', self.cover_url)
|
||||
|
||||
feeds = []
|
||||
|
@ -519,8 +519,7 @@ class Economist(BasicNewsRecipe):
|
||||
self.description = safe_dict(data, "props", "pageProps", "content", "headline")
|
||||
self.timefmt = ' [' + safe_dict(data, "props", "pageProps", "content", "formattedIssueDate") + ']'
|
||||
self.cover_url = safe_dict(data, "props", "pageProps", "content", "cover", "url").replace(
|
||||
'economist.com/', 'economist.com/cdn-cgi/image/width=960,quality=80,format=auto/'
|
||||
)
|
||||
'economist.com/', 'economist.com/cdn-cgi/image/width=960,quality=80,format=auto/').replace('SQ_', '')
|
||||
self.log('Got cover:', self.cover_url)
|
||||
|
||||
feeds = []
|
||||
|
@ -38,7 +38,7 @@ class TimeMagazine(BasicNewsRecipe):
|
||||
title = article.get('friendly_title') or article.get('short_title')
|
||||
if title == 'In the Latest Issue' or 'content' not in article:
|
||||
continue
|
||||
url = article['shortlink']
|
||||
url = article['shortlink'].replace('?p=', '')
|
||||
desc = article.get('excerpt') or ''
|
||||
self.log(title, ' at ', url)
|
||||
self.log('\t', desc)
|
||||
|
Loading…
x
Reference in New Issue
Block a user