2 ms·
> XPATH is generally more powerful... That is a convincing argument is you can back it up with an XPATH expression.
by dotancohen 4y ago
> XPATH is generally more powerful...
That is a convincing argument is you can back it up with an XPATH expression.
- mdaniel 4y agoWell, the rest of their sentence summed it up pretty well; try and implement that example using CSS selectors Hell, even "find id=subhead and _go up one element_" isn't possible in CSS because that's not a problem it was designed to solve
- showerst 4y agoHere’s an example of parsing some particularly annoying old school html. I’m not claiming it’s the _best_ way to do it, just that you can, and I’m not sure this one is doable with selectors. https://github.com/openstates/openstates-scrapers/blob/40246156dcd56ecaeb6130d6b610813992d90093/scrapers/mo/bills.py#L578 https://github.com/openstates/openstates-scrapers/blob/40246...