3 ms·
I wrote something similar a while ago as a bit of an experiment - again, it uses Readability and jsdom. It's slow because there's a lot of unoptimised code in
by scraplab 16y ago
I wrote something similar a while ago as a bit of an experiment - again, it uses Readability and jsdom.
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:
https://github.com/tomtaylor/thelma https://github.com/tomtaylor/thelma
- Swizec 16y agoHaving the benefit of hacking around jsdom for a while to fix certain bugs, I could tweak Readability to work around the slowness. 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 :)