Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

Torcello

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

Torcello

Just a Python module suitable to use multiple Tor circuits at the same time

  • 0.3.1
  • PyPI
  • Socket score

Maintainers
1

How to use::

from torcello import Tor
from threading import Thread

def do_something():
    tor = Tor()
    for one in range(5):
        response = tor.get('http://domain-name.com')
        print('Hooray, here is desired data: %s' %  response.text)
        tor.new_ip()
    tor.destroy()

for incident in range(5):
    Thread(target=do_something).start()

also try it as rotating proxy::

from time import sleep
from torcello import Tor
from threading import Thread

for one in range(12):
    Thread(target=Tor).start()

while len(Tor.order) < 10:
    print('Waiting for tor, %s tor instances is ready' % len(Tor.order))
    sleep(5)


for incident in range(20):
    response = Tor.first().get('http://domain-name')
    print('Hooray, here is desired data: %s' %  response.text)
    while not Tor.next_tor():
        sleep(1)

# Delete all instances and close all Tor daemons
Tor.clean()

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc