Unable to make python requests over tor ConnectionRefusedError: [WinError 10061]
问题 I am trying to make requests using python requests over tor, but i get the error "ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it". Here is the code i am using: import requests def get_tor_session(): session = requests.session() # Tor uses the 9050 port as the default socks port session.proxies = {'http': 'socks5://127.0.0.1:9050', 'https': 'socks5://127.0.0.1:9050'} return session # Make a request through the Tor connection