Scrapy start_urls

后端 未结 6 1529
有刺的猬
有刺的猬 2020-12-28 23:23

The script (below) from this tutorial contains two start_urls.

from scrapy.spider import Spider
from scrapy.selector import Selector

from dirb         


        
6条回答
  •  孤城傲影
    2020-12-29 00:24

    If you use BaseSpider, inside the callback, you have to extract out your desired urls yourself and return a Request object.

    If you use CrawlSpider, links extraction would be taken care of by the rules and the SgmlLinkExtractor associated with the rules.

提交回复
热议问题