You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was trying to determine the status of support for CSS4 selectors in scrapy but could not find any information. Is there any plan to add such support? I think the CSS4 working draft has some very useful extensions that other libraries like soupsieve, the CSS selector library used by Beautiful Soup, for example, already support.
In particular I would like to make the case for :has and possibly also :is. In the course of my experiments with scraping websites (for which scrapy is truly a lifesaver), I have come across several websites where I need to, just as an example, get the p tag after the p tag containing an image. See for example getting the job titles out of this webpage. Using :has this would be trivial with p:has(strong) + p but it is not possible currently with parsel.
And before people jump on me saying "Hey! Just use XPath selectors", I know that I could use XPath. But XPath selectors have a much steeper learning curve than CSS selectors and I can train people to use CSS much more easily than XPath.
The text was updated successfully, but these errors were encountered:
I was trying to determine the status of support for CSS4 selectors in scrapy but could not find any information. Is there any plan to add such support? I think the CSS4 working draft has some very useful extensions that other libraries like soupsieve, the CSS selector library used by Beautiful Soup, for example, already support.
In particular I would like to make the case for
:has
and possibly also:is
. In the course of my experiments with scraping websites (for which scrapy is truly a lifesaver), I have come across several websites where I need to, just as an example, get thep
tag after thep
tag containing animage
. See for example getting the job titles out of this webpage. Using:has
this would be trivial withp:has(strong) + p
but it is not possible currently with parsel.And before people jump on me saying "Hey! Just use XPath selectors", I know that I could use XPath. But XPath selectors have a much steeper learning curve than CSS selectors and I can train people to use CSS much more easily than XPath.
The text was updated successfully, but these errors were encountered: