I have this code:
dict = {
"key": "0"
}
And I am reading some proxies from a file. Basically, I am updating dict['key']
with every single proxy. Resulting in
"key": ['proxy1','proxy2'...]
But when I make a request, I have this:
for x in range(0,l):
requests.get(link, proxies=proxies[x])
The error I am getting is:
File "main.py", line 19, in (module)
request.get(link, proxies=dict['key'][x])
Key Error: 0
Doing proxies['http'][x]
gives me the "str object has no attribute 'get' "
.
It seems that it cannot make one request with each proxy.
Any help would be appreciated.