3 ms·
Might you be willing to share your code/approach? How does it differ from Readability's algorithm?
by mikeklaas 16y ago
Might you be willing to share your code/approach? How does it differ from Readability's algorithm?
- ronnier 16y agoI took readability's algorithm (in JavaScript) and ported it over to C#. It's not a direct port of course, as lots of things in C# are done differently than in JavaScript, and I didn't have the browsers DOM to work with. In addition, readability performs the processing while on the current page, leaving elements in place. For me, I just have the HTML string to work with. That's the biggest difference, otherwise I followed their idea on how to extract the main content.