01/10/2023 02:00:52 crawler.py[line:20] INFO 正在采集[谷歌]...
01/10/2023 02:00:52 crawler.py[line:20] INFO 正在采集[谷歌]...
Traceback (most recent call last):
File "/www/wwwroot/company-crawler-master/spider_venv/lib/python3.7/site-packages/urllib3/connection.py", line 175, in _new_conn
(self._dns_host, self.port), self.timeout, **extra_kw
File "/www/wwwroot/company-crawler-master/spider_venv/lib/python3.7/site-packages/urllib3/util/connection.py", line 95, in create_connection
raise err
File "/www/wwwroot/company-crawler-master/spider_venv/lib/python3.7/site-packages/urllib3/util/connection.py", line 85, in create_connection
sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/www/wwwroot/company-crawler-master/spider_venv/lib/python3.7/site-packages/urllib3/connectionpool.py", line 710, in urlopen
chunked=chunked,
File "/www/wwwroot/company-crawler-master/spider_venv/lib/python3.7/site-packages/urllib3/connectionpool.py", line 398, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/www/wwwroot/company-crawler-master/spider_venv/lib/python3.7/site-packages/urllib3/connection.py", line 239, in request
super(HTTPConnection, self).request(method, url, body=body, headers=headers)
File "/www/server/panel/pyenv/lib/python3.7/http/client.py", line 1277, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/www/server/panel/pyenv/lib/python3.7/http/client.py", line 1323, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/www/server/panel/pyenv/lib/python3.7/http/client.py", line 1272, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/www/server/panel/pyenv/lib/python3.7/http/client.py", line 1032, in _send_output
self.send(msg)
File "/www/server/panel/pyenv/lib/python3.7/http/client.py", line 972, in send
self.connect()
File "/www/wwwroot/company-crawler-master/spider_venv/lib/python3.7/site-packages/urllib3/connection.py", line 205, in connect
conn = self._new_conn()
File "/www/wwwroot/company-crawler-master/spider_venv/lib/python3.7/site-packages/urllib3/connection.py", line 187, in _new_conn
self, "Failed to establish a new connection: %s" % e
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f794904ee50>: Failed to establish a new connection: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/www/wwwroot/company-crawler-master/spider_venv/lib/python3.7/site-packages/requests/adapters.py", line 499, in send
timeout=timeout,
File "/www/wwwroot/company-crawler-master/spider_venv/lib/python3.7/site-packages/urllib3/connectionpool.py", line 788, in urlopen
method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
File "/www/wwwroot/company-crawler-master/spider_venv/lib/python3.7/site-packages/urllib3/util/retry.py", line 592, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=5010): Max retries exceeded with url: /get (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f794904ee50>: Failed to establish a new connection: [Errno 111] Connection refused'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/www/wwwroot/company-crawler-master/tianyancha.py", line 19, in
crawler.start()
File "/www/wwwroot/company-crawler-master/tianyancha/crawler.py", line 21, in start
companies = TycClient().search(key).companies
File "/www/wwwroot/company-crawler-master/tianyancha/client.py", line 37, in search
data = Request(url, self.payload, proxy=True, headers=REQUEST_HEADERS).data
File "/www/wwwroot/company-crawler-master/util/httpclient.py", line 24, in init
self.get(**kwargs)
File "/www/wwwroot/company-crawler-master/util/httpclient.py", line 27, in get
p = proxy() if GLOBAL_PROXY and self.proxy else None
File "/www/wwwroot/company-crawler-master/util/httpclient.py", line 47, in proxy
p = Request(f"{PROXY_POOL_URL}/get").data
File "/www/wwwroot/company-crawler-master/util/httpclient.py", line 24, in init
self.get(**kwargs)
File "/www/wwwroot/company-crawler-master/util/httpclient.py", line 28, in get
resp = requests.get(self.url, params=self.params, verify=False, proxies=p, **kwargs)
File "/www/wwwroot/company-crawler-master/spider_venv/lib/python3.7/site-packages/requests/api.py", line 73, in get
return request("get", url, params=params, **kwargs)
File "/www/wwwroot/company-crawler-master/spider_venv/lib/python3.7/site-packages/requests/api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
File "/www/wwwroot/company-crawler-master/spider_venv/lib/python3.7/site-packages/requests/sessions.py", line 587, in request
resp = self.send(prep, **send_kwargs)
File "/www/wwwroot/company-crawler-master/spider_venv/lib/python3.7/site-packages/requests/sessions.py", line 701, in send
r = adapter.send(request, **kwargs)
File "/www/wwwroot/company-crawler-master/spider_venv/lib/python3.7/site-packages/requests/adapters.py", line 565, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=5010): Max retries exceeded with url: /get (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f794904ee50>: Failed to establish a new connection: [Errno 111] Connection refused'))
Traceback (most recent call last):
File "/www/wwwroot/company-crawler-master/spider_venv/lib/python3.7/site-packages/urllib3/connection.py", line 175, in _new_conn
(self._dns_host, self.port), self.timeout, **extra_kw
File "/www/wwwroot/company-crawler-master/spider_venv/lib/python3.7/site-packages/urllib3/util/connection.py", line 95, in create_connection
raise err
File "/www/wwwroot/company-crawler-master/spider_venv/lib/python3.7/site-packages/urllib3/util/connection.py", line 85, in create_connection
sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/www/wwwroot/company-crawler-master/spider_venv/lib/python3.7/site-packages/urllib3/connectionpool.py", line 710, in urlopen
chunked=chunked,
File "/www/wwwroot/company-crawler-master/spider_venv/lib/python3.7/site-packages/urllib3/connectionpool.py", line 398, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/www/wwwroot/company-crawler-master/spider_venv/lib/python3.7/site-packages/urllib3/connection.py", line 239, in request
super(HTTPConnection, self).request(method, url, body=body, headers=headers)
File "/www/server/panel/pyenv/lib/python3.7/http/client.py", line 1277, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/www/server/panel/pyenv/lib/python3.7/http/client.py", line 1323, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/www/server/panel/pyenv/lib/python3.7/http/client.py", line 1272, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/www/server/panel/pyenv/lib/python3.7/http/client.py", line 1032, in _send_output
self.send(msg)
File "/www/server/panel/pyenv/lib/python3.7/http/client.py", line 972, in send
self.connect()
File "/www/wwwroot/company-crawler-master/spider_venv/lib/python3.7/site-packages/urllib3/connection.py", line 205, in connect
conn = self._new_conn()
File "/www/wwwroot/company-crawler-master/spider_venv/lib/python3.7/site-packages/urllib3/connection.py", line 187, in _new_conn
self, "Failed to establish a new connection: %s" % e
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f747eaf9d50>: Failed to establish a new connection: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/www/wwwroot/company-crawler-master/spider_venv/lib/python3.7/site-packages/requests/adapters.py", line 499, in send
timeout=timeout,
File "/www/wwwroot/company-crawler-master/spider_venv/lib/python3.7/site-packages/urllib3/connectionpool.py", line 788, in urlopen
method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
File "/www/wwwroot/company-crawler-master/spider_venv/lib/python3.7/site-packages/urllib3/util/retry.py", line 592, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=5010): Max retries exceeded with url: /get (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f747eaf9d50>: Failed to establish a new connection: [Errno 111] Connection refused'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/www/wwwroot/company-crawler-master/tianyancha.py", line 19, in
crawler.start()
File "/www/wwwroot/company-crawler-master/tianyancha/crawler.py", line 21, in start
companies = TycClient().search(key).companies
File "/www/wwwroot/company-crawler-master/tianyancha/client.py", line 37, in search
data = Request(url, self.payload, proxy=True, headers=REQUEST_HEADERS).data
File "/www/wwwroot/company-crawler-master/util/httpclient.py", line 24, in init
self.get(**kwargs)
File "/www/wwwroot/company-crawler-master/util/httpclient.py", line 27, in get
p = proxy() if GLOBAL_PROXY and self.proxy else None
File "/www/wwwroot/company-crawler-master/util/httpclient.py", line 47, in proxy
p = Request(f"{PROXY_POOL_URL}/get").data
File "/www/wwwroot/company-crawler-master/util/httpclient.py", line 24, in init
self.get(**kwargs)
File "/www/wwwroot/company-crawler-master/util/httpclient.py", line 28, in get
resp = requests.get(self.url, params=self.params, verify=False, proxies=p, **kwargs)
File "/www/wwwroot/company-crawler-master/spider_venv/lib/python3.7/site-packages/requests/api.py", line 73, in get
return request("get", url, params=params, **kwargs)
File "/www/wwwroot/company-crawler-master/spider_venv/lib/python3.7/site-packages/requests/api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
File "/www/wwwroot/company-crawler-master/spider_venv/lib/python3.7/site-packages/requests/sessions.py", line 587, in request
resp = self.send(prep, **send_kwargs)
File "/www/wwwroot/company-crawler-master/spider_venv/lib/python3.7/site-packages/requests/sessions.py", line 701, in send
r = adapter.send(request, **kwargs)
File "/www/wwwroot/company-crawler-master/spider_venv/lib/python3.7/site-packages/requests/adapters.py", line 565, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=5010): Max retries exceeded with url: /get (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f747eaf9d50>: Failed to establish a new connection: [Errno 111] Connection refused'))