diff --git a/recipes/natgeo.recipe b/recipes/natgeo.recipe index 5d2c89551b..e0fa1844ae 100644 --- a/recipes/natgeo.recipe +++ b/recipes/natgeo.recipe @@ -53,6 +53,16 @@ def parse_body(item): elif c.get('cmsType') == 'image': for line in parse_lead_image(c): 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 '
' + 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..f219b5ec5d 100644 --- a/recipes/natgeohis.recipe +++ b/recipes/natgeohis.recipe @@ -52,6 +52,16 @@ def parse_body(item): elif c.get('cmsType') == 'image': for line in parse_lead_image(c): 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 '
' + 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