您现在的位置是: 首页 > 后端开发 > Python python scrapy 出现 DEBUG: Filtered offsite request to 错误
python scrapy 出现 DEBUG: Filtered offsite request to 错误
2020-06-08 【Python】 3088人已围观 5615次浏览
简介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 自动填充无效问题解决
- SpringBoot 2.x 文件上传出现 The field file exceeds its maximum permitted size of 1048576 bytes
- nuxt 项目完整部署方案
站长推荐
猜你喜欢
- cmder vim方向键无法使用 解决方案
- linux下各文件夹的结构说明及用途介绍
- SpringBoot 集成 Elasticsearch 7.8.1 出现错误 Factory method 'elasticsearchRestHighLevelClient' threw exception; nested exception is java.lang.NoSuchFieldError: IGNORE_DEPRECATIONS
- 在更新python时出现dyld: Library not loaded: /usr/local/opt/libpsl/lib/libpsl.5.dylib,Reason: image not found错误解决方案
- 类 BASE64Decoder 程序包 sun.misc 找不到符号
- SpringBoot 2.x Security security.basic.enabled=false 失效问题解决
- 记一次Java MessageFormat.format踩坑
- SpringBoot 启动提示 Requested bean is currently in creation: Is there an unresolvable circular reference?
- 自建Ngrok服务端
- nginx 出现 the "ssl" directive is deprecated, use the "listen ... ssl" directive instead in 错误解决方案