首页 > Web开发 > 详细

scrapy 采集网页出现丢失url的问题

时间:2019-03-06 13:25:26      阅读:178      评论:0      收藏:0      [点我收藏+]

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)

scrapy 采集网页出现丢失url的问题

原文:https://www.cnblogs.com/fly-kaka/p/10482355.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!