Answer the question
In order to leave comments, you need to log in
Tor as a proxy?
There is a parser, for which I want to use tor addresses as a proxy.
I came across a solution on the Internet: launch the tor browser on your PC and specify localhost:9150 as a proxy.
But here's the problem: how to connect directly to tor addresses, and not through the tor browser. And you need to be able to simultaneously connect to dozens of addresses from the tor network and use them as a proxy server.
Answer the question
In order to leave comments, you need to log in
There are 2 options for using the Tor network, both involve using authorization.
1. Using a bunch of random_user:password . In this case, a new IP address is issued for each user during authorization. Those. with each requests request, you will receive a new IP.
proxy_auth = str(random.randint(10000, 2147483647)) + ':' + 'passwrd'
proxies = {'http': 'socks5h://{}@localhost:9050'.format(proxy_auth), 'https': 'socks5h://{}@localhost:9050'.format(proxy_auth)}
response = requests.get(url, proxies=proxies)
proxy_auth = 'user' + ':' + str(random.randint(10000, 2147483647))
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question