import requests
number = requests.get("http://chainz.cryptoid.info/cure/api.dws?Key=3972cc3ec73f&q=getbalance&a=BMBGZdp8cB9gi2hgxJFBTyxgUZcL6aw6B")
print number.text新手的问题,但是
我看不出我得到的号码是403
发布于 2015-03-13 01:32:52
如果它在浏览器中工作,但是从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)https://stackoverflow.com/questions/29023103
复制相似问题