Closed as not planned
Description
const html = `
<div><div><div>
More than 25 characters!!
</div></div></div>
<div><meta name="twitter:title" content="1"></div>`;
const doc = new DOMParser().parseFromString(html, 'text/html')
const base = doc.createElement('base')
base.setAttribute('href', url)
doc.head.appendChild(base)
const reader = new Readability(doc, {
keepClasses: true,
})
const result = reader.parse(); // crashes here
Stack trace:
TypeError: Cannot read properties of null (reading 'tagName')
at Readability._grabArticle (node_modules/@extractus/article-extractor/node_modules/@mozilla/readability/Readability.js:1147:37)
at Readability.parse (node_modules/@extractus/article-extractor/node_modules/@mozilla/readability/Readability.js:2265:31)
Pages to test on:
I couldn't fix myself. Sorry.
Metadata
Metadata
Assignees
Labels
No labels