diff --git a/recipes/natgeo.recipe b/recipes/natgeo.recipe index 5d2c89551b..91201f5c33 100644 --- a/recipes/natgeo.recipe +++ b/recipes/natgeo.recipe @@ -48,11 +48,21 @@ def parse_body(item): if item.get('type') == 'inline': if c.get('cmsType') == 'listicle': if 'title' in c: - yield '
' + c['quote'] + '' + elif c.get('cmsType') == 'editorsNote': + if 'note' in c: + yield '
' + c['note'] + '' else: if c['mrkup'].strip().startswith('<'): yield c['mrkup'] @@ -87,6 +97,10 @@ def article_parse(data): continue for mod in frm.get('mods', ()): 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': for line in parse_article(edg): yield line diff --git a/recipes/natgeohis.recipe b/recipes/natgeohis.recipe index c620b4a5a7..c4310c872c 100644 --- a/recipes/natgeohis.recipe +++ b/recipes/natgeohis.recipe @@ -47,11 +47,21 @@ def parse_body(item): if item.get('type') == 'inline': if c.get('cmsType') == 'listicle': if 'title' in c: - yield '
' + c['quote'] + '' + elif c.get('cmsType') == 'editorsNote': + if 'note' in c: + yield '
' + c['note'] + '' else: if c['mrkup'].strip().startswith('<'): yield c['mrkup'] @@ -86,6 +96,10 @@ def article_parse(data): continue for mod in frm.get('mods', ()): 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': for line in parse_article(edg): yield line diff --git a/recipes/natgeomag.recipe b/recipes/natgeomag.recipe index bfe52c8f4d..e5fd4ec031 100644 --- a/recipes/natgeomag.recipe +++ b/recipes/natgeomag.recipe @@ -49,11 +49,21 @@ def parse_body(item): if item.get('type') == 'inline': if c.get('cmsType') == 'listicle': if 'title' in c: - yield '
' + c['quote'] + '' + elif c.get('cmsType') == 'editorsNote': + if 'note' in c: + yield '
' + c['note'] + '' else: if c['mrkup'].strip().startswith('<'): yield c['mrkup'] @@ -88,6 +98,10 @@ def article_parse(data): continue for mod in frm.get('mods', ()): 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': for line in parse_article(edg): yield line