Discrepancy between firefox reader mode to readability library.
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- javascript, nodejs
- Domain
- web-dev
Research direction
Start by reproducing the supplied PMC article with the shown Node.js, JSDOM, and Readability setup, then compare its output with Firefox Reader View. Investigate why only the References section is selected; done means the discrepancy is explained and a specific correction or configuration requirement is identified.
Written by the indexing model from the issue text.
Description
Hi all,
I have an unresolved problem. I'm figuring out why, in some cases, I get the desired view I want, a full article in Firefox reader view.
but using node js, with JSDOM, resulting in only part of it.
this is the article I'm using:
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6540991/
Firefox is parsing it all, from top to bottom.
Using node-js with this library, I get only the 'References' part of the article.
Are there any more configurations that I should consider?
this is my code:
const jsd = new JSDOM(doc,{
url,
referrer: url,
contentType: "text/html",
includeNodeLocations: true,
pretendToBeVisual: true,
})
const readable = new Readability(jsd .window?.document, {debug: true }).parse()
using ff reading view:
using the readability library:
Thanks!
- Dominant language
- JavaScript
- Stars
- 11.5k
- Forks
- 732
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from mozilla/readability
-
Difficulty 1/5 Under an hour Newbie friendliness 76/100
mozilla/readability#1026 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
mozilla/readability#997 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 58/100
mozilla/readability#1031 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 42/100
mozilla/readability#1029 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 58/100
mozilla/readability#1024 ·
All issues in mozilla/readability
Similar issues
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
optimization optimization:agents-md-curator
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
githubnext/gh-aw-cao#13143 ·
-
status: needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100