Scrapy爬虫之解决“‘Rule’ object is not iterable” Scrapy爬虫出现“‘Rule’ object is not iterable”时,意思是rule规定的正则表达式无法迭代,无法进一步爬取到所规定的页面,现有以下几种解决方式供参考。 解决方法 检查是否有相关代码打错。 完善正则表达式 rules=( Rule(LinkExtractor(allow=r"http://news.qq.com/omn/20200501/.*?.html"),callback="parse_news",follow=True