Reputation: 338
Requests doesn't resolve nameservers
via proxies
argument given to it by default.
How can we use make it do that ?
Upvotes: 1
Views: 1024
Reputation: 338
Bases on requests documentation:
Using the scheme
socks5
causes theDNS
resolution to happen on the client, rather than on the proxy server. This is in line with curl, which uses the scheme to decide whether to do theDNS
resolution on the client or proxy. If you want to resolve the domains on the proxy server, usesocks5h
as the scheme.
Hence we have to just set socks5h
for the scheme of the proxy given to the proxies
argument.
Upvotes: 1