fix(route): parse error for nationalgeographic (#16362)
This commit is contained in:
@@ -58,7 +58,7 @@ async function handler() {
|
||||
cache.tryGet(item.link, async () => {
|
||||
const response = await got(item.link);
|
||||
const $ = load(response.data);
|
||||
const mods = findNatgeo($).page.content.article.frms.find((f) => f.cmsType === 'ArticleBodyFrame').mods;
|
||||
const mods = findNatgeo($).page.content.prismarticle.frms.find((f) => f.cmsType === 'ArticleBodyFrame').mods;
|
||||
const bodyTile = mods.find((m) => m.edgs[0].cmsType === 'ArticleBodyTile').edgs[0];
|
||||
|
||||
item.author = bodyTile.cntrbGrp
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
{{ if b.type === 'p' }}
|
||||
<p>{{@ b.cntnt.mrkup }}</p>
|
||||
{{ else if b.type === 'inline' }}
|
||||
{{ if b.cntnt.cmsType === 'image' }}
|
||||
{{ if b.cntnt.cmsType === 'image' && b.cntnt.image?.src }}
|
||||
<figure>
|
||||
<img src="{{ b.cntnt.image.src }}" alt="{{ b.cntnt.image.altText }}">
|
||||
<figcaption>{{@ b.cntnt.caption }}</figcaption>
|
||||
|
||||
Reference in New Issue
Block a user