0
import json
import requests

country = 'GB'
url = ('http://kitkabackend.eastus.cloudapp.azure.com:5010/highscore/crowns/list?country='+country)  
r = requests.get(url)
print(r.text)

The same code was working for me for a while before but now it suddenly gives me an error like before. I've tried adding headers when requesting but that also didn't fix the error.(im a beginner using repl.it)

error shown on console - raise ConnectionError(err, request=request) requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response

  • The remote endpoint is not responding to your request. It likely doesn't have anything to do with your request and is instead a server problem. – anothermh Oct 01 '21 at 15:34
  • When i put the website url on a browser it still works. and is there anyway to solve this @anothermh . Also when run this on another repl it works for some time then it stops working again. [link](http://kitkabackend.eastus.cloudapp.azure.com:5010/highscore/crowns/list?country=GB) the link is working normally but not in the code – dhairya2402 Oct 01 '21 at 15:41
  • Works fine for me (even without explicit headers). I suspect you've been blacklisted –  Oct 01 '21 at 15:49
  • It used to work fine for me too so I think I have been blacklisted. Also I haven't used the request very often so I'm not sure why I've been blacklisted and is there anyway I can be whitelisted again @BrutusForcus – dhairya2402 Oct 01 '21 at 15:54
  • I'm going to guess that you're accessing that URL so frequently that the owner noticed and is actively stopping connections from your client, or you're accessing it so frequently that it is consuming enough resources that it appears the server is not responding when in fact it's just really busy. – anothermh Oct 01 '21 at 16:00

0 Answers0