rules = (
Rule(LinkExtractor(allow=(r"href=\"\/courses\/\d*\"", )), callback='parse'),
)
Doesn't work for me, if I don't do from scrapy.contrib.spiders import CrawlSpider, Rule
Here's how I understand what and when to import?
Thank you.
import scrapy
from scrapy.spiders import CrawlSpider, Rule
from scrapy.linkextractors import LinkExtractor
scrapy.linkextractors.lxmlhtml.LxmlLinkExtractor
classscrapy.spiders.
Rule
(link_extractor, callback=None, cb_kwargs=None, follow=None, process_links=None, process_request=None)
from scrapy.spiders import Rule