3 ms·
I notice this client is based on libxml.js. Does anyone know if anyone is working on a "flexible" HTML/XHTML parser a la BeautifulSoup / Nokogiri / TagSoup, et
by Maciek416 17y ago
I notice this client is based on libxml.js.
Does anyone know if anyone is working on a "flexible" HTML/XHTML parser a la BeautifulSoup / Nokogiri / TagSoup, etc? Node could become very useful as a base for building scrapers if this existed.
- simonw 17y agolibxml2 has an excellent tag soup parser (the Python lxml module makes heavy use of it) - but I don't think libxml.js exposes it yet.
- olegp 17y agoAs an alternative to libxml2 one could use tagsoup as a separate process and a JS only parser like XML for script.
- sprsquish 17y agoI've been trying to model libxml.js after Nokogiri. I wanted to get something built and working first. The next step is to expose libxml2's html parser. Someone else has started working on find-by-CSS a la Nokogiri. I'll merge that into libxml.js when it's ready. BTW, I'm looking for more help on this project. A new job has diminished the amount of time I can spend on OSS projects.
- Maciek416 17y agoHi, thanks for working on this. I went ahead and wrote a very simple test for HTML parsing and added an parseHTML() binding. I've sent you a pull request. You can check out the commit here: http://github.com/Maciek416/libxmljs/commit/87f28186cd4d2f2fccbb650f2f69fa465bba600c http://github.com/Maciek416/libxmljs/commit/87f28186cd4d2f2f...