Safari has a "Reader Mode" which removes everything from a website with an article but the text. Does anyone know of an open source library which provides the same functionality? Or, do you think it would be difficult to implement?
问题:
回答1:
Safari's reader mode is based upon Arc90's Readability(the original, not current, one), which is Apache-licensed. Here's a PHP port of it. Some more searching will probably turn up various other languages. (You didn't really specify where you were asking about implementing.)
回答2:
I'm aware of the licencing issue about my post might raise here, but it's Apple and their policies are philosophically contestable. So, for the common good & research :
Safari JS reader source: https://github.com/romainbruckert/safari-reader-js
How to get the latest version from Safari is explained in the README.
If you really want an open source Version, user the other posts, they're all good.
Cheers.
回答3:
Here is a fairly popular JavaScript version based on arc90's readability project as well.
https://github.com/luin/readability
回答4:
Firefox for Android contains a file called Readability.js which says:
- This code is heavily based on Arc90's readability.js (1.7.1) script
- available at: http://code.google.com/p/arc90labs-readability