您现在的位置是: 首页 > 后端开发 > Python python scrapy 出现 DEBUG: Filtered offsite request to 错误
python scrapy 出现 DEBUG: Filtered offsite request to 错误
2020-06-08 【Python】 2249人已围观 4463次浏览
简介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 项目完整部署方案
站长推荐
猜你喜欢
- idea去掉Smart commands execution提示
- LNMP定时备份任务教程(支持排除指定文件夹)
- Oracle ORA-12541:TNS:no listener错误解决方法
- CentOS 安装JDK
- win10 cmder Debian 安装配置 oh-my-zsh
- 解决443端口被VMWare Workstation占用
- Docker 批量操作命令
- nginx 出现 the "ssl" directive is deprecated, use the "listen ... ssl" directive instead in 错误解决方案
- 防止Time Machine备份Parallels Desktop的虚拟硬盘文件
- Python 钉钉加签 HmacSHA256 算法签名