1.在scrapy.Request方法里边加上参数dont_filter=True(去重)
2.增加是不是allowed_domains范围内的url
3.yield Request 改为yield scrapy.http.Request
4.在scrapy.Request方法里边添加errback=self.errback,然后在外边写 errback方法,获取错误信息,针对错误信息查找资料
yield scrapy.Request(url=hear,callback=self.parse_x,meta={"item":deepcopy(item)},errback=self.errback)
def errback(self,failure):
self.logger.error(repr(failure))