url
带有附加路径https://www.businessesforsale.com/search
时,回调不会调用 parse 方法,但它可以与URL https://www.businessesforsale.com
import scrapy
class MySpider(scrapy.Spider):
name = 'test'
allowed_domains = ['businessesforsale.com']
def start_requests(self):
yield scrapy.Request('https://www.businessesforsale.com/search', self.parse)
def parse(self, response):
print('Some actions...')