Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Code is not responding
#1
I'm trying to run tor with python requests module so i write this code but this code is not responding and not showing any error
what's the error in this code please help
from stem import Signal
from stem.control import Controller
import requests

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


session=requests.session()
session.proxies['http']='socks5://127.0.0.1:9051'
session.proxies['https']='socks5://127.0.0.1:9051'


for i in range(5):
    response=session.get('http://httpbin.org/ip')
    print(response.text)
    change_ip()
i did not apply the password in tor configuration file, still the code is not responding
please help
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  elif not responding on print EddieG 3 870 Jul-20-2023, 09:44 PM
Last Post: Pedroski55
  Pygame Rect Not Responding SomebodyImportant 1 1,537 May-02-2021, 01:27 PM
Last Post: BashBedlam
  IDLE stops responding upon saving tompi1 2 1,935 Oct-01-2020, 05:44 PM
Last Post: Larz60+
  Sublime text not responding Mat 1 1,972 Mar-23-2020, 11:42 AM
Last Post: Fre3k
  IDLE not responding (Mac) Selinal 1 2,962 Aug-05-2019, 10:27 PM
Last Post: Larz60+
  Client Server Game Pygame not responding Damien 2 3,142 Aug-04-2018, 06:19 PM
Last Post: micseydel
  Discord bot not responding to command [New User] Alabaster 0 3,396 May-20-2018, 06:34 PM
Last Post: Alabaster
  [Discord.py] Bot not responding? Ouindoze 2 10,106 Oct-10-2017, 01:35 AM
Last Post: Ouindoze

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020