deedy5 / requests_tor

Multithreading requests via TOR with automatic TOR new identity
MIT License
53 stars 15 forks source link

Tor ip will change after every God damn request. #13

Closed mortezanabavi closed 1 year ago

mortezanabavi commented 1 year ago

Hi, Tor ip will change after every God damn request.

ports = []
for id in range(1000):
    ports.append(5000 + id)

rt = RequestsTor(tor_ports=ports, autochange_id=0)
url = 'https://httpbin.org/anything'
first = rt.get(url)
print(first.text)
second = rt.get(url)
print(second.text)
deedy5 commented 1 year ago

Different ports will give different ip. If you want the same ip, send requests through the same port.

mortezanabavi commented 1 year ago

How can I give range ports to the tor and use it? I want to change my IP 4000 times non-repeatedly per hour with Tor. Is it possible?

deedy5 commented 1 year ago

show me the code

mortezanabavi commented 1 year ago

show me the code

ports = []
for id in range(1000):
    ports.append(5000 + id)

rt = RequestsTor(tor_ports=ports, autochange_id=0)
url = 'https://httpbin.org/anything'
first = rt.get(url)
print(first.text)
second = rt.get(url)
print(second.text)
deedy5 commented 1 year ago

Didn't understand the question. Doesn't it start? Show me the error.

mortezanabavi commented 1 year ago

Can I change the 4000 times ip? it changes just 300 IPs per hour.

deedy5 commented 1 year ago

I don't understand the question. Why do you need to change ip 4000 times? Show me your code where the error appears, so I can reproduce the problem.