So I have this code. Whenever I run the code, and it gets to line 3, it takes about 20 whole seconds to do the get request. There is no reason it should be taking this long, and it's consistently taking long every time. Any help?
def get_balance(addr):
try:
r = requests.get("http://blockexplorer.com/api/addr/"+addr+"/balance")
return int(r.text)/10000000
except:
return "e"