3 ms·
pyquery's a good alternative too. it's a slightly larger wrapper around lxml that lets you use jquery selectors.
by crdoconnor 12y ago
pyquery's a good alternative too. it's a slightly larger wrapper around lxml that lets you use jquery selectors.
- klibertp 12y agolxml's `cssselect` method is nice for this - I found that with `xpath` and `cssselect` I have no need for anything else. I use cssselect for simple queries, like "a.something" - which would be needlessly verbose in XPath - and xpath for more complex ones, for example when I need access to axes or I want to apply some simple transform to the data before processing it in Python. Worked very well for me.