I need an explanation on what requests does with a proxyDict, specifically the following:
1. Does it evenly cycle through all of the proxies in the dictionary?
2. What happens if one of them goes down, will requests be able to handle it, or do I have to?
3. What happens if one gets "banned", will it handle it?
4. If I make a get call in a function, will it still cycle through the proxies evenly?
So if I have a dictionary of proxies like so:
proxyDict = {
'https' : 'https://IP1:PORT',
'https' : 'https://IP2:PORT',
'https' : 'https://IP3:PORT',
'https' : 'https://IP4:PORT'
}
And I have a get request:
s = requests.Session()
data = {"Username":"user", "Password":"pass"}
s.get(download_url, proxies = proxyDict, verify=False)
Which might be in a function, similarly to this (my question #4):
def foo(download_url, proxyDict, s):
s.get(download_url, proxies = proxyDict, verify=False)
Also is there any way to print which proxy is currently in use?