3 ms·
I was intrigued to see what CSS selector engine it was using... https://github.com/chriso/node.io https://github.com/chriso/node.io uses https://github.com/har
by simonw 16y ago
I was intrigued to see what CSS selector engine it was using...
https://github.com/chriso/node.io https://github.com/chriso/node.io uses https://github.com/harryf/node-soupselect https://github.com/harryf/node-soupselect
https://github.com/harryf/node-soupselect https://github.com/harryf/node-soupselect is a port of my https://github.com/simonw/soupselect https://github.com/simonw/soupselect library for Python
https://github.com/simonw/soupselect https://github.com/simonw/soupselect is a port of my getElementsBySelector function for JavaScript: http://simonwillison.net/2003/Mar/25/getElementsBySelector/ http://simonwillison.net/2003/Mar/25/getElementsBySelector/
I'm always surprised to see that code still being used - it's the least complete selector library out there by a long way.
- chrisohara 16y agoHi Simon, great libs - thanks! there's been many improvements added to node-soupselect and node.io though - the API is here: https://github.com/chriso/node.io/wiki/API---CSS-Selectors-and-Traversal-methods https://github.com/chriso/node.io/wiki/API---CSS-Selectors-a...
- simonw 16y agoOh nice - the .rawtext and .striptags methods are particularly useful.
- harryf 16y ago> I'm always surprised to see that code still being used - it's the least complete selector library out there by a long way. For this use case being complete doesn't matter so much as users are just after a handy way pull content out of a page. And having "got intimate" with the source while porting it, it's a really elegant piece of code - have the impression that try to make it do more would ruin it.