您现在的位置是: 首页 > 后端开发 > Python python scrapy 出现 DEBUG: Filtered offsite request to 错误
python scrapy 出现 DEBUG: Filtered offsite request to 错误
2020-06-08 【Python】 1631人已围观 3459次浏览
简介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
站长推荐
猜你喜欢
- 记一次Java MessageFormat.format踩坑
- 常见端口号
- Nestedset 出现 Node must exists. 错误解决方案
- Android SDK版本号与API级别的对照表
- CentOS 安装Python3
- Linux no space left on device 出现设备上没有空间问题
- docker mysql 导入 SQL 脚本
- SpringBoot 启动提示 Requested bean is currently in creation: Is there an unresolvable circular reference?
- 获取阿里云CDN真实IP
- 查看MySQL默认读取的配置文件