Is there a Python library that can parse an CSS selector and emit an equivalent XPath expression? For Ruby, there is Nokogiri.
I recently took over cssselect and made it an independent project after extracting it from lxml: http://packages.python.org/cssselect/
It does precisely what the question asks for. The XPath expressions produced can then be used in lxml. PyQuery actually uses cssselect (formerly lxml.cssselect)
How about pyQuery?
Answer based on PHP equivalent of PyQuery or Nokogiri?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With