Scrapy爬虫之解决“’Rule’ object is not iterable”

上传:非同寻常 浏览: 17 推荐: 0 文件:PDF 大小:44.94KB 上传时间:2021-04-19 17:57:29 版权申诉
Scrapy爬虫之解决“‘Rule’ object is not iterable” Scrapy爬虫出现“‘Rule’ object is not iterable”时,意思是rule规定的正则表达式无法迭代,无法进一步爬取到所规定的页面,现有以下几种解决方式供参考。 解决方法 检查是否有相关代码打错。 完善正则表达式 rules=( Rule(LinkExtractor(allow=rhttp://news.qq.com/omn/20200501/.*?.html),callback=parse_news,follow=True), ) 观察其他网
上传资源
用户评论