Questions tagged [stem]

Stem is a Python controller library for Tor.

Stem is a Python controller library that allows applications to interact with Tor (https://www.torproject.org/).

For tutorials and API documentation see stem’s homepage.

Quick Start

To install you can either use…

pip install stem

… or install from the source tarball. Stem supports both the python 2.x and 3.x series. To use its python3 counterpart you simply need to install using that version of python.

python3 setup.py install

After that, give some tutorials a try! For questions or to discuss project ideas we’re available on irc and the tor-dev@ email list.

104 questions
2
votes
0 answers

Change Tor IP from Python with Stem

Specs (MacOSx - Last version , Python 3.5 , Stem and Tor Browser for Mac) I just start to learn more about Tor and i wanted to change my Tor route from Python Script. from stem import Signal from stem.control import Controller from stem import…
Jérémy JOKE
  • 271
  • 4
  • 15
2
votes
1 answer

"ImportError: cannot import name connect" when trying to import Stem

I am trying to go through Stem's tutorial for Python, using Ubuntu 14.04. After using sudo apt-get install python-stem and installing Stem, I found myself not knowing how to use it. I tried to run simple code below, which I got from…
shaoyibai
  • 55
  • 1
  • 7
1
vote
2 answers

Python : Stem TOR Controller: SocketError: Socket error: 0x01: General SOCKS server failure

Hello im having hard time to use the tor stem module, it causes error on the with Controller.from_port(port=9050) as controller:I tried to check if my i am running on port 9050 using netstats, the service on the tor is already enabled tcp 0 …
se6
  • 121
  • 8
1
vote
1 answer

Adjusting the number indexes for the Stem-Leaf plot in R

How would I be able to edit the r code below so that I can use the integers as the stems and tenths as the leaves in the stem-leaf plot. data_ <- c (130.38, 129.39, 131.75, 131.32, 129.5, 132.79) sort_data <- sort(data_) stem(sort_data)
Bosser445
  • 303
  • 1
  • 9
1
vote
1 answer

Tor IP Rotation in Python - stem.SocketError: [Errno 61] Connection refused

I am writing a webscraper using Python and Beutifulsoup. It was not long before my IP got blocked. I now need to rotate my IP so that I can connect to the website and scrape the required data. I mostly followed tutorials and git repo…
CodeMantis
  • 75
  • 6
1
vote
0 answers

Docker-compose unable to connect static ip

For some needs I'd like a python app to connect to a tor proxy but instead of the DNS I want to use the static ip. Indeed when I I'm unable to make it happen. The request is always timed out when I want to connect to the database. Here is my…
TLd
  • 602
  • 8
  • 23
1
vote
2 answers

How to get only filename without extension?

Imagine you have these paths of files you want to get the filename without extension from: relfilepath 0 20210322636.pdf 12 factuur-f23622.pdf 14 ingram micro.pdf 19 upfront.nl…
Max
  • 493
  • 2
  • 9
1
vote
0 answers

Incorrect (?) lemma returned by NLTK WordNetLemmatizer for particular words

I was reading this article and experimenting on my own data, I found both the examples given in the article and one of my words didn't work as described. You can refer to the article for more information, though the question here has everything to…
stucash
  • 1,078
  • 1
  • 12
  • 23
1
vote
1 answer

stem.SocketError: [Errno 111] Connection refused

I am trying to deploy a flask application as a .onion site. I am using stem. I have gone through a bunch of tutorials, but still, come up with this error: stem.SocketError: [Errno 111] Connection refused I have configured torrc, and I have changed…
1
vote
0 answers

How to renew IP with Tor and stem

I'm trying to change Tor IP every 5 seconds with stem to no avail, the IP is always the same. I mostly followed this answer but I'm not sure if everything is setup correctly. My torrc file (windows 10) looks like this: ControlPort 9051 ## If you…
iamdlm
  • 1,885
  • 1
  • 11
  • 21
1
vote
0 answers

Make get api requests using Python over Tor

I'm trying to load JSON data through a tor session. URL_1 works fine, but URL_2 does not work (Example I). I don't know why.. Here is the type of error I get: IP: I can well recover Json api data without tor session (Example II)…
Laurent
  • 43
  • 1
  • 6
1
vote
0 answers

How can I send Tor requests to a website with stem?

I would like to send Tor requests to the website I entered. I cannot find an answer to my current question about StackOverflow, so I ask the question. If you have found an answer that answers my question, I would be very happy to receive an answer!
1
vote
1 answer

Set custom and changing baseline to stem plot in Matplotlib

I'm triying to make a figure where the stem plot has the baseline on the data of dataframe_3_merged['TOTAL']. import numpy as np from eurostatapiclient import EurostatAPIClient import matplotlib.pyplot as plt import matplotlib.ticker as mtick import…
1
vote
1 answer

stem.connection.IncorrectSocketType: unable to use the control socket

Trying to send requests over Tor with requests[socks] and renew the IP after x amount of requests. This is the code: def tor(): session = requests.session() session.proxies = {'http': 'socks5://127.0.0.1:9050', …
tarsier
  • 11
  • 4
1
vote
1 answer

Python Tor torrequest/stem make a get request from a specific country

I'm working on a web crawler to generate some web traffic, figured I'll be needing to use tor (reset_identity()) after I visit the desired website. Also I need my connection to exit through Germany specifically. I've been working with couple of…