Skip to content

Commit

Permalink
fix(route): filter espresso paywalled content (#15491)
Browse files Browse the repository at this point in the history
  • Loading branch information
josh authored May 6, 2024
1 parent cc0207f commit 7892a54
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/routes/economist/espresso.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ async function handler() {
);

const nextData = JSON.parse($('script#__NEXT_DATA__').text());
const parts = nextData.props.pageProps.content.hasPart.parts[0].hasPart.parts.filter((part) => part.type.includes('Article'));
const parts = nextData.props.pageProps.content.hasPart.parts[0].hasPart.parts.filter((part) => part.type.includes('Article') && part.headline !== '');

const renderHTML = (node) => {
let el;
Expand Down

0 comments on commit 7892a54

Please sign in to comment.