mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Update natgeomag.recipe
fix missing images
This commit is contained in:
parent
b4c15a0e55
commit
51663c3d27
@ -54,6 +54,16 @@ def parse_body(item):
|
|||||||
elif c.get('cmsType') == 'image':
|
elif c.get('cmsType') == 'image':
|
||||||
for line in parse_lead_image(c):
|
for line in parse_lead_image(c):
|
||||||
yield line
|
yield line
|
||||||
|
elif c.get('cmsType') == 'imagegroup':
|
||||||
|
for imgs in c['images']:
|
||||||
|
for line in parse_lead_image(imgs):
|
||||||
|
yield line
|
||||||
|
elif c.get('cmsType') == 'pullquote':
|
||||||
|
if 'quote' in c:
|
||||||
|
yield '<blockquote>' + c['quote'] + "</blockquote>"
|
||||||
|
elif c.get('cmsType') == 'editorsNote':
|
||||||
|
if 'note' in c:
|
||||||
|
yield '<blockquote>' + c['note'] + "</blockquote>"
|
||||||
else:
|
else:
|
||||||
if c['mrkup'].strip().startswith('<'):
|
if c['mrkup'].strip().startswith('<'):
|
||||||
yield c['mrkup']
|
yield c['mrkup']
|
||||||
@ -88,6 +98,10 @@ def article_parse(data):
|
|||||||
continue
|
continue
|
||||||
for mod in frm.get('mods', ()):
|
for mod in frm.get('mods', ()):
|
||||||
for edg in mod.get('edgs', ()):
|
for edg in mod.get('edgs', ()):
|
||||||
|
if edg.get('cmsType') == 'ImmersiveLeadTile':
|
||||||
|
if 'image' in edg.get('cmsImage', {}):
|
||||||
|
for line in parse_lead_image(edg['cmsImage']):
|
||||||
|
yield line
|
||||||
if edg.get('cmsType') == 'ArticleBodyTile':
|
if edg.get('cmsType') == 'ArticleBodyTile':
|
||||||
for line in parse_article(edg):
|
for line in parse_article(edg):
|
||||||
yield line
|
yield line
|
||||||
|
Loading…
x
Reference in New Issue
Block a user