您现在的位置是: 首页 > 后端开发 > Python python scrapy 出现 DEBUG: Filtered offsite request to 错误
python scrapy 出现 DEBUG: Filtered offsite request to 错误
2020-06-08 【Python】 1034人已围观 1688次浏览
简介python scrapy 出现 DEBUG: Filtered offsite request to 错误
在使用 python scrapy 时出现 DEBUG: Filtered offsite request to 错误提示
根据官方文档的解释,是因为 request 的地址和 allow_domain 里面冲突,也就是已经爬取过的页面被记录下来了,下次再访问同样的地址(地址相同,参数不同,也会被认为是同一个地址)就会被过滤掉。如果是需要继续爬取相同的页面,就需要去掉过滤的功能,比如
yield Request(url=next_url
, callback=self.subPage
# 最后要加上dont_filter=True,否则不继续往下执行,因为URL都是相同的,不同的是后面的参数
, dont_filter=True)
最后加上 dont_filter=True 即可
很赞哦! (0)
点击排行
- Error in execution; nested exception is io.lettuce.core.RedisCommandExecutionException: ERR DISABLE You can't write or read against a disable instance
- RocketMQ 出现 sendDefaultImpl call timeout 问题
- 类 BASE64Decoder 程序包 sun.misc 找不到符号
- Debian apt 使用国内镜像
- SpringBoot @NotBlank 不生效问题
- 记一次 Mybatis-Plus 自动填充无效问题解决
- nuxt 项目完整部署方案
- gulp3 在 node12 上运行出现异常 primordials is not defined
站长推荐
猜你喜欢
- Win10 安装适用于Linux的Windows子系统
- 迁移 Docker 目录
- Linux 安装 Tengine
- 类 BASE64Decoder 程序包 sun.misc 找不到符号
- 常见端口号
- springboot引入mybatis-plus后出现ClassNotFoundException: org.mybatis.logging.LoggerFactory
- PHP 在执行 composer install 时出现提示 PHP Fatal error: Allowed memory size of XXXXXX bytes exhausted <...>
- Vue 报错 Avoid using non-primitive value as key, use string/number value instead
- 在使用Flutter进行网络请求时,使用Dio访问https地址出现unable to get local issuer certificate错误
- Redis 提示 MISCONF Redis is configured to save RDB snapshots, but it is currently not able to persist on disk 解决方案