0

I can't understand the differance between new identity from Tor browser or python?

Python: I make request to call website from python with tor but website have limit reached and required reCAPTCHA so I make new identity to reset all informations to skip reCAPTCHA but doesn't work and IP is change success

Tor Browser: but the point here when I was used Tor Browser and Website show reCAPTCHA and I make new identity from Tor Browser is worked success and skip reCAPTCHA and website is working fine

from stem import Signal
from stem.control import Controller
import requests


proxies = {
    'http': 'socks5://127.0.0.1:9050',
    'https': 'socks5://127.0.0.1:9050'
}

def new_identity():
  with Controller.from_port(port = 9051) as controller:
      controller.authenticate()
      controller.signal(Signal.NEWNYM)


url = 'https://ifconfig.me/ip'
response = requests.get(url, proxies=proxies)
print('tor ip: {}'.format(response.text.strip()))

new_identity()

url = 'https://ifconfig.me/ip'
response = requests.get(url, proxies=proxies)
print('tor ip: {}'.format(response.text.strip()))

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.