Lurker News
Defuddle is an open-source JS library I built to parse and extract the main content and metadata from web pages. It can also return the content as Markdown.

I built Defuddle while working on Obsidian Web Clipper[1] (also MIT-licensed) because Mozilla's Readability[2] appears to be mostly abandoned, and didn't work well for many sites.
It's still very much a work in progress, but I thought I'd share it today, in light of the announcement that Mozilla is shutting down Pocket. This library could be helpful to anyone building a read-it-later app.
Defuddle is also available as a CLI:
https://github.com/kepano/defuddle-cli
[1] https://github.com/obsidianmd/obsidian-clipper
[2] https://github.com/mozilla/readability

Comments (68) 30 threads

Earlier comments
novoreorx#
I built a similar project called Substance [^0]. Unlike most readability tools that try to solve the problem once and for all, it takes a different approach. It provides a framework to define how each website should be handled, ensuring better results for each website covered.

[^0]: https://substance.reorx.com/

Andr2Andr2 replies#
Serious question - who and why would be using this tool? What is the use case? In other comments I have only seen exporting ChatGPT conversations to md
degosuke#
I use LogSeq a lot - and having the option to scrape a website with only the text in MD seems like a great fit.
rollcat#
This is a library, not a tool. You can use it for a number of purposes:

- Providing "reader mode" for your visitors
- Using it in a browser extension to add reader mode
- Scrapping
- Plugging it into a [reverse] proxy that automatically removes unnecessary bloat from pages, for e.g. easier access on retro hardware <https://web.archive.org/web/20240621144514/https://humungus....> (archive.org link, because the website goes down regularly)

jonplackett1 reply#
Does anyone know why readers don’t work for some websites where it looks like they should - ie normal article with lots of text.

You just get a completely white page (on the iPhone reader). Usually it’s a news website.
Is this the website intentionally obscuring the content to ensure they can serve their ads? If so how do they go about it?

miki123211#
Cookie and "we care about your privacy" banners are often the cause here, especially if you're in the EU / UK / possibly California[1].

On some websites, those are just modals that obscure the content, something that reader mode can usually deal with just fine, but on others, they're implemented as redirects or rendered server-side.
If reader mode doesn't work, dismiss those first and try again.

severusdd#
This is very cool! Given how messy and busy many websites have become, we really need a robust markdown converter that lets readers focus on reading the content. Nice to see something stepping up where Readability left off.

Thank you for picking up this work :-)

Load more comments