Scrapy采集网页出现丢失url的问题,加dont_filter参数
url_list = ["http://www.icoat.cc/news/list_18_3.html", "http://www.icoat.cc/news/list_18.html",
"http://www.icoat.cc/news/list_18_2.html",
]
for ls in url_list:
  yield scrapy.Request(url=ls, headers=header, callback=self.parseList, meta={"hd": header})
采集的过程中发现丢失了很多url,而且url_list中只采集了前两个,不知道为什么,google后发现加上dont_filter后可以解决丢失url的问题
yield scrapy.Request(url=ls, headers=header, callback=self.parseList, meta={"hd": header}, dont_filter=True)

 
 
                
            
         
         浙公网安备 33010602011771号
浙公网安备 33010602011771号