Tor_Crawler. 02-23-2020, 09:41 AM
#1
Hello,
I downloaded the Tor_Crawler from below URL:
But I can't use it and got below error:
Tor is running:
How can I solve it?
Thank you.
I downloaded the Tor_Crawler from below URL:
Code:
https://github.com/alex-miller-0/Tor_CrawlerCode:
$ python3.7m
Python 3.7.3 (default, Dec 20 2019, 18:57:59)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from TorCrawler import TorCrawler
>>> my = TorCrawler()
Traceback (most recent call last):
File "/home/jason/.local/lib/python3.7/site-packages/socks.py", line 809, in connect
negotiate(self, dest_addr, dest_port)
File "/home/jason/.local/lib/python3.7/site-packages/socks.py", line 444, in _negotiate_SOCKS5
self, CONNECT, dest_addr)
File "/home/jason/.local/lib/python3.7/site-packages/socks.py", line 533, in _SOCKS5_request
raise SOCKS5Error("{:#04x}: {}".format(status, error))
socks.SOCKS5Error: 0x05: Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 159, in _new_conn
(self._dns_host, self.port), self.timeout, **extra_kw)
File "/usr/lib/python3/dist-packages/urllib3/util/connection.py", line 80, in create_connection
raise err
File "/usr/lib/python3/dist-packages/urllib3/util/connection.py", line 70, in create_connection
sock.connect(sa)
File "/home/jason/.local/lib/python3.7/site-packages/socks.py", line 47, in wrapper
return function(*args, **kwargs)
File "/home/jason/.local/lib/python3.7/site-packages/socks.py", line 814, in connect
raise GeneralProxyError("Socket error", error)
socks.GeneralProxyError: Socket error: 0x05: Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 600, in urlopen
chunked=chunked)
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 354, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/usr/lib/python3.7/http/client.py", line 1244, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/lib/python3.7/http/client.py", line 1290, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/lib/python3.7/http/client.py", line 1239, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/lib/python3.7/http/client.py", line 1026, in _send_output
self.send(msg)
File "/usr/lib/python3.7/http/client.py", line 966, in send
self.connect()
File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 181, in connect
conn = self._new_conn()
File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 168, in _new_conn
self, "Failed to establish a new connection: %s" % e)
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f02e10a5278>: Failed to establish a new connection: Socket error: 0x05: Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/jason/.local/lib/python3.7/site-packages/requests/adapters.py", line 449, in send
timeout=timeout
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 638, in urlopen
_stacktrace=sys.exc_info()[2])
File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 398, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='www.icanhazip.com', port=80): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f02e10a5278>: Failed to establish a new connection: Socket error: 0x05: Connection refused'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/jason/.local/lib/python3.7/site-packages/TorCrawler.py", line 139, in __init__
self.ip = self.check_ip()
File "/home/jason/.local/lib/python3.7/site-packages/TorCrawler.py", line 256, in check_ip
return requests.get("http://www.icanhazip.com").text[:-2]
File "/home/jason/.local/lib/python3.7/site-packages/requests/api.py", line 75, in get
return request('get', url, params=params, **kwargs)
File "/home/jason/.local/lib/python3.7/site-packages/requests/api.py", line 60, in request
return session.request(method=method, url=url, **kwargs)
File "/home/jason/.local/lib/python3.7/site-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/home/jason/.local/lib/python3.7/site-packages/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "/home/jason/.local/lib/python3.7/site-packages/requests/adapters.py", line 516, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='www.icanhazip.com', port=80): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f02e10a5278>: Failed to establish a new connection: Socket error: 0x05: Connection refused'))Code:
# service tor status tor
● tor.service - Anonymizing overlay network for TCP (multi-instance-master)
Loaded: loaded (/lib/systemd/system/tor.service; enabled; vendor preset: enabled)
Active: active (exited) since Sun 2020-02-23 12:00:45 +0330; 10min ago
Process: 17252 ExecStart=/bin/true (code=exited, status=0/SUCCESS)
Main PID: 17252 (code=exited, status=0/SUCCESS)
Feb 23 12:00:45 Xen-aka-X3n systemd[1]: Starting Anonymizing overlay network for TCP (multi-instance-mast
Feb 23 12:00:45 Xen-aka-X3n systemd[1]: Started Anonymizing overlay network for TCP (multi-instance-masteThank you.




![[+]](https://sinister.li/images/modern/collapse_collapsed.png)


