-
|
I'm probably being pretty dumb but I'm struggling to find how to use my own proxy. If I define proxies=[list of proxies] it fails with an error. If it matters I'm defining the proxy as usrname:password@url:port The goodnews is, its working fantastically but as I ramp up use I'll need to use proxies. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Answering my own question in case it helps somebody else, and I'm sure there is a more elegant solution but I needed to include the proxy lib, create a proxy object and pass in a simply list of proxies proxieslist = ['socks5://usrname:password@url:port','socks5://usrname2:password2@url2:port2'] then made proxies = [Proxy.all(p) for p in proxieslist] then added proxies when I created the client client = Client( |
Beta Was this translation helpful? Give feedback.
Answering my own question in case it helps somebody else, and I'm sure there is a more elegant solution but I needed to include the proxy lib, create a proxy object and pass in a simply list of proxies
proxieslist = ['socks5://usrname:password@url:port','socks5://usrname2:password2@url2:port2']
then made
proxies = [Proxy.all(p) for p in proxieslist]
then added proxies when I created the client
client = Client(
emulation=Emulation.Firefox139,
proxies=proxies
)