html - Scrapy shell 不适用于 https://www.target.com.au/
问题描述
我已经测试过我的外壳适用于其他网站,但拒绝在目标上工作。
raise self.value.with_traceback(self.tb)
twisted.web._newclient.ResponseNeverReceived: [<twisted.python.failure.Failure twisted.internet.error.ConnectionLost: Connection to the other side was lost in a non-clean fashion: Connection lost.>]
解决方案
看起来该站点正在忽略基于您的用户代理字符串的请求。
这有效:
scrapy shell target.com.au --nolog --set=USER_AGENT=Mozilla
推荐阅读
- bazel - 如何升级 Bazel 感知库的 Maven 依赖项?
- react-native - 在 React Native(使用 NativeBase)中,为什么我会收到一条错误消息“期望一个字符串......”
- ios - 作为自定义 UITableViewCell 文本的一部分的 UILabel 未在 cellForRowAtIndexPath 中更新
- bots - slack 机器人可以使用 slack-api 作为管理员或完全权限用户,使用 slack 作为访客吗?
- kubernetes - minikube 以及如何调试 api 服务器错误
- javascript - 为什么当我在获取输入类型的函数中输入 {} 时我得到未定义
- javascript - 如何用透明背景为本地图标图像着色?
- reactjs - 如何为提供者使用具有多个值的 React Hooks 上下文
- python - 在 Kivy 中使用 jsonstore
- python - 错误 ------ 解析时出现意外的 EOF