python requests.get错误消息 导入请求 number=请求。获取(“http://chainz.cryptoid.info/cure/api.dws?Key=3972cc3ec73f&q=getbalance&a=BMBGZdp8cB9gi2hgxJFBTyxgUZcL6aw6B") 打印数字文本

python requests.get错误消息 导入请求 number=请求。获取(“http://chainz.cryptoid.info/cure/api.dws?Key=3972cc3ec73f&q=getbalance&a=BMBGZdp8cB9gi2hgxJFBTyxgUZcL6aw6B") 打印数字文本,python,Python,新手问题,但是 如果在您的浏览器中运行,我似乎无法获取错误403的数字,但是从python获取403,我猜您可能有一些代理设置,否则此代码应该可以正常工作 如果您在代理后面,则需要配置请求模块以了解它 import requests proxies = { "http": "http://10.10.1.10:3128", "https": "http://10.10.1.10:1080", } requests.get("http://chainz.cryptoid.info/cu

新手问题,但是


如果在您的浏览器中运行,我似乎无法获取错误403的数字,但是从python获取403,我猜您可能有一些代理设置,否则此代码应该可以正常工作

如果您在代理后面,则需要配置请求模块以了解它

import requests

proxies = {
  "http": "http://10.10.1.10:3128",
  "https": "http://10.10.1.10:1080",
}

requests.get("http://chainz.cryptoid.info/cure/api.dws?Key=3972cc3ec73f&q=getbalance&a=BMBGZdp8cB9gi2hgxJFBTyxgUZcL6aw6B", proxies=proxies)

对我有用。你真的可以在浏览器中打开链接吗?是的,我可以在浏览器中打开链接,但在python中它会打印403禁止你没有权限访问此服务器上的/cure/api.dws。

谢谢我使用的是codeacademy可能他们有代理