python - 如何在scrapy中跳过页面?
问题描述
我Scrapy
最近开始使用。
我在命令行中使用了下面的代码
scrapy shell https://website.com/portal/login
然后我在下面输入
response.css('::text')
输出
[<Selector xpath='descendant-or-self::text()' data='Transferring to the website...'>, <Selector xpath='descendant-or-self::text()' data=' در ﺣﺎل اﻧﺘﻘﺎل ﺑﻪ ﺳﺎﯾﺖ ﻣﻮرد ﻧﻈﺮ ﻫﺴﺘﯿﺪ...'>, <Selector xpath='descendant-or-self::text()' data='var _this = this;\n\n function _typeof...'>]
当我在登录页面出现之前使用Web浏览器(及以上带有scrapy的浏览器)时,会打开另一个带有transferring to the website...
中心消息的页面。
我的问题是如何防止这种情况发生?如何跳过此加载页面,当我输入login url
inscrapy shell
命令时,我得到登录页面而不是加载页面?
解决方案
推荐阅读
- python - 按钮对象更改为偶数对象
- mysql - 在mysql中查询一个表的关系
- javascript - 猫头鹰旋转木马未正确显示
- android - 当 BottomAppBar 从隐藏状态返回时,BottomAppBar FabCradleMargin 变得越来越小,几乎是平的
- java - java - 从文本提取中省略特殊字符
- html - 从nodeJS中的“请求”获取Dom元素
- sas - 将有序值转换为配对
- typescript - 为什么来自 any[] 的元组推理变为 [string, string, ... ] 而从 string[] 变为 ['literal1', 'literal2', ... ]
- firebase-performance - HttpMetric可以直接设置时间而不调用start/stop吗?
- git - Gitlab网站合并请求:git push origin master "一切都是最新的"