Ever wanted arc90′s Readability as an API?
preona.net
preona.net
The beauty of our approach is that we didn't have to port it and we can adapt much quicker when new versions come out.
Pismo also comes with a command line client built-in, so you can do stuff like this:
$ pismo http://preona.net/2010/11/ever-wanted-arc90s-readability-as-an-api/ title sentences
:title: "Ever wanted arc90's Readability as an API?"
:sentences: Over at Preona we have been wanting something just like that for a while now. So we built it! Some time ago, while developing LazyReadr, we were faced with the fact that RSS feeds simply aren't all that lovely anymore.
Note: "sentences" picks the first few sentences by default, but this is ideal for a summary by an automated system or for a news page :-)If you need speed (BeautifulSoup is slow), and not portability (lxml won't work on google app engine), check out http://blog.interstellr.com/readability-in-python-using-lxml
I actually suggested that there be a <usercontent> tag to one of the people on the HTML5 committee because among other things comments sections throw off many of these web scraping algorithms. After 3 emails, he didn't buy my argument, so I gave up. So all web designers, please oh, pretty please, use the up and coming <article> tag correctly. Many data/text miners will thank you dearly!
It's slow because there's a lot of unoptimised code in jsdom which makes certain DOM manipulations pretty slow. It's early days for this stuff.
So in lieu of them open sourcing their code, which is almost certainly more robust, here it is:
Also node-htmlparser now contains a patch of mine so it's a bit more robust.
I think you'll find your code might be a bit more robust than you left it, in part due to my wanting to make our API robust :)
We're also going to be issuing an update soon to include multi-page reading. So you can grab those long, paginated New Yorker articles all in one API call.
EDIT: Oh, wait, that's nothing like readability, is it? It just cleans HTML up into text...
If anyone didn't manage to view the two examples, please go check them again :)
--> http://plateboiler.lazyreadr.com/static/example1.html and http://plateboiler.lazyreadr.com/static/example2.html
1. Help us instead :)
2. Use Superfeedr, it will make your life easier.
Also thanks for calling awesome, we're really not that awesome, just have too much time on our hands :P
https://chrome.google.com/extensions/detail/nahmdndkmncjhppb...
First hit on Google for "Safari Readability"