您现在的位置是: 首页 > 后端开发 > Python python scrapy 出现 DEBUG: Filtered offsite request to 错误
python scrapy 出现 DEBUG: Filtered offsite request to 错误
2020-06-08 【Python】 1726人已围观 3708次浏览
简介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
- Debian apt 使用国内镜像
- RocketMQ 出现 sendDefaultImpl call timeout 问题
- 类 BASE64Decoder 程序包 sun.misc 找不到符号
- SpringBoot @NotBlank 不生效问题
- 记一次 Mybatis-Plus 自动填充无效问题解决
- nuxt 项目完整部署方案
- SpringBoot 2.x 文件上传出现 The field file exceeds its maximum permitted size of 1048576 bytes
站长推荐
猜你喜欢
- 类 BASE64Decoder 程序包 sun.misc 找不到符号
- ThinkPHP 解决跨域访问问题
- docker mysql 导入 SQL 脚本
- SpringBoot 启动测试时出现提示 Test class should have exactly one public zero-argument constructor
- Zookeeper 找不到或无法加载主类 org.apache.zookeeper.server.quorum.QuorumPeerMain
- Vue 监听回车 el-input 和 input 使用方法不同
- 在更新python时出现dyld: Library not loaded: /usr/local/opt/libpsl/lib/libpsl.5.dylib,Reason: image not found错误解决方案
- sentinel directive while not in sentinel mode 问题解决
- Debian/Ubuntu无netstat命令解决方案
- gulp3 在 node12 上运行出现异常 primordials is not defined