Conceptually simple question/idea.
Using Scrapy, how to I use use LinkExtractor
that extracts on only follows links with a given CSS?
Seems trivial and like it should already be built in, but I don't see it? Is it?
It looks like I can use an XPath, but I'd prefer using CSS selectors. It seems like they are not supported?
Do I have to write a custom LinkExtractor
to use CSS selectors?
From what I understand, you want something similar to
restrict_xpaths
, but provide a CSS selector instead of an XPath expression.This is actually a built-in feature in Scrapy 1.0 (currently in a release candidate state), the argument is called
restrict_css
:The initial feature request: