Forums

errno 111

use proxy in requests module and it's work in my computer. but in pythonanywhere doesn't work.. url = http://www.bitmex.com and it's in whitelist

this is my code:

import requests

url = "http://www.bitmex.com" proxies = { 'http':'http://12.139.101.98:80' }

r = requests.get(url= url, proxies = proxies) data = r.status_code print(data)

That won't work in a free account. You're trying to connect to the proxy, and the proxy isn't on the whitelist. You'd need a paid account to connect outbound using proxies like that.