mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Update Spectator Magazine
Fixes #1902397 [Spectator Magazine no author names](https://bugs.launchpad.net/calibre/+bug/1902397)
This commit is contained in:
parent
61c6bef817
commit
792c2ca847
@ -108,16 +108,14 @@ class Spectator(BasicNewsRecipe):
|
|||||||
a('<h3>{}</h3>'.format(byline))
|
a('<h3>{}</h3>'.format(byline))
|
||||||
if entry.get('author'):
|
if entry.get('author'):
|
||||||
for au in reversed(entry['author']):
|
for au in reversed(entry['author']):
|
||||||
au = entry['author'][0]
|
|
||||||
cac = ''
|
cac = ''
|
||||||
if au.get('caricature'):
|
if au.get('caricature'):
|
||||||
cac = '<img src="{}">'.format(au['caricature']['url'])
|
cac = '<div><img style="max-width: 80px" src="{}"></div>'.format(au['caricature']['url'])
|
||||||
a('<div>{} <a href="{}>{}</a></div>'.format(cac, absolutize(au['url']), au['title']))
|
a('<div>{} <a href="{}">{}</a></div>'.format(cac, absolutize(au['url']), au['title']))
|
||||||
|
|
||||||
if entry.get('hero_image'):
|
if entry.get('hero_image'):
|
||||||
hi = entry['hero_image'][0]
|
hi = entry['hero_image'][0]
|
||||||
a('<div style="text-align: center"><img src="{}"></div>'.format(hi['url']))
|
a('<div style="text-align: center"><img src="{}"></div>'.format(hi['url']))
|
||||||
if hi.get('description'):
|
|
||||||
a('<div style="text-align: center; font-size: smaller">{}</div>'.format(hi['description']))
|
|
||||||
a(entry['text_body'])
|
a(entry['text_body'])
|
||||||
section = 'Unknown'
|
section = 'Unknown'
|
||||||
if entry.get('topic'):
|
if entry.get('topic'):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user