【问题标题】:Python request gives 404 response, but I get 200 when I run the code from local serverPython 请求给出 404 响应,但是当我从本地服务器运行代码时得到 200
【发布时间】:2021-10-06 00:19:03
【问题描述】:

我以前使用过 python 请求。但是,现在我在这个特定的网站Jiomart.com 上遇到了 404 问题。

当我尝试从本地服务器发送请求时,它给了我 200 作为响应。当我完成项目并将其部署在 Digital Ocean 服务器上后,我收到 404 作为响应。 我不知道为什么。有没有人遇到过同样的问题? 而不是 Jiomart.com 所有其他网站,我得到 200 作为响应。

我的系统配置 蟒蛇3.8.6, Ubuntu 20.0, Python 请求

site = requests.Session()
res = site.get('https://www.jiomart.com/')
print(res)

【问题讨论】:

    标签: python-3.x python-requests http-status-code-404 python-responses


    【解决方案1】:

    如果您将该 URL 放入允许您从不同地理位置预览站点的服务中,您会看到使用 Amazon Cloudfront 的地理阻止功能对其进行了地理限制。

    【讨论】:

      猜你喜欢
      • 2014-12-07
      • 2021-04-24
      • 1970-01-01
      • 2019-01-16
      • 2020-07-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-08-30
      相关资源
      最近更新 更多