爬虫新问题
Traceback (most recent call last):
File "D:\software\python\python310\lib\site-packages\urllib3\connectionpool.py", line 790, in urlopen
response = self._make_request(
File "D:\software\python\python310\lib\site-packages\urllib3\connectionpool.py", line 536, in _make_request
response = conn.getresponse()
File "D:\software\python\python310\lib\site-packages\urllib3\connection.py", line 461, in getresponse
httplib_response = super().getresponse()
File "D:\software\python\python310\lib\http\client.py", line 1375, in getresponse
response.begin()
File "D:\software\python\python310\lib\http\client.py", line 318, in begin
version, status, reason = self._read_status()
File "D:\software\python\python310\lib\http\client.py", line 287, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response
The above exception was the direct cause of the following exception:
urllib3.exceptions.ProxyError: ('Unable to connect to proxy', RemoteDisconnected('Remote end closed connection without response'))
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "D:\software\python\python310\lib\site-packages\requests\adapters.py", line 486, in send
resp = conn.urlopen(
File "D:\software\python\python310\lib\site-packages\urllib3\connectionpool.py", line 844, in urlopen
retries = retries.increment(
File "D:\software\python\python310\lib\site-packages\urllib3\util\retry.py", line 515, in increment
raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type]
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='seller.ozon.ru', port=443): Max retries exceeded with url: /api/site/seller-analytics/what_to_sell/data/v3 (Caused by ProxyError('Unable to connect to proxy', RemoteDisconnected('Remote end closed connection without response')))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\mycode\python\seller-project\main.py", line 22, in <module>
cs.get_result(item_id)
File "D:\mycode\python\seller-project\crawl\crawler_seller.py", line 107, in get_result
CrawlerSeller.myClient.insert_data(collect_name="collect_" + category_id,
File "D:\mycode\python\seller-project\crawl\crawler_seller.py", line 63, in post_url
response = requests.post(
File "D:\software\python\python310\lib\site-packages\requests\api.py", line 115, in post
return request("post", url, data=data, json=json, **kwargs)
File "D:\software\python\python310\lib\site-packages\requests\api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
File "D:\software\python\python310\lib\site-packages\requests\sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
File "D:\software\python\python310\lib\site-packages\requests\sessions.py", line 703, in send
r = adapter.send(request, **kwargs)
File "D:\software\python\python310\lib\site-packages\requests\adapters.py", line 513, in send
raise ProxyError(e, request=request)
requests.exceptions.ProxyError: HTTPSConnectionPool(host='seller.ozon.ru', port=443): Max retries exceeded with url: /api/site/seller-analytics/what_to_sell/data/v3 (Caused by ProxyError('Unable to connect to proxy', RemoteDisconnected('Remote end closed connection without response'))
urllib3.exceptions.SSLError: EOF occurred in violation of protocol (_ssl.c:1007)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "D:\software\python\python310\lib\site-packages\requests\adapters.py", line 486, in send
resp = conn.urlopen(
File "D:\software\python\python310\lib\site-packages\urllib3\connectionpool.py", line 844, in urlopen
retries = retries.increment(
File "D:\software\python\python310\lib\site-packages\urllib3\util\retry.py", line 515, in increment
raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type]
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='seller.ozon.ru', port=443): Max retries exceeded with url: /api/site/seller-analytics/what_to_sell/data/v3 (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1007)')))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\mycode\python\seller-project\main.py", line 22, in <module>
cs.get_result(item_id)
File "D:\mycode\python\seller-project\crawl\crawler_seller.py", line 107, in get_result
json_result = self.post_url(json_data)
File "D:\mycode\python\seller-project\crawl\crawler_seller.py", line 63, in post_url
response = requests.post(
File "D:\software\python\python310\lib\site-packages\requests\api.py", line 115, in post
return request("post", url, data=data, json=json, **kwargs)
File "D:\software\python\python310\lib\site-packages\requests\api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
File "D:\software\python\python310\lib\site-packages\requests\sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
File "D:\software\python\python310\lib\site-packages\requests\sessions.py", line 703, in send
r = adapter.send(request, **kwargs)
File "D:\software\python\python310\lib\site-packages\requests\adapters.py", line 517, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='seller.ozon.ru', port=443): Max retries exceeded with url: /api/site/seller-analytics/what_to_sell/data/v3 (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1007)')))
加入verify=False
host '127.0.0.1'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#tls-warnings
warnings.warn(
D:\software\python\python310\lib\site-packages\urllib3\connectionpool.py:1095: InsecureRequestWarning: Unverified HTTPS request is being made to host '127.0.0.1'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#tls-warnings
warnings.warn(
D:\software\python\python310\lib\site-packages\urllib3\connectionpool.py:1095: InsecureRequestWarning: Unverified HTTPS request is being made to host '127.0.0.1'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#tls-warnings
warnings.warn(
Traceback (most recent call last):
File "D:\software\python\python310\lib\site-packages\urllib3\connectionpool.py", line 776, in urlopen
self._prepare_proxy(conn)
File "D:\software\python\python310\lib\site-packages\urllib3\connectionpool.py", line 1041, in _prepare_proxy
conn.connect()
File "D:\software\python\python310\lib\site-packages\urllib3\connection.py", line 642, in connect
sock_and_verified = _ssl_wrap_socket_and_match_hostname(
File "D:\software\python\python310\lib\site-packages\urllib3\connection.py", line 783, in _ssl_wrap_socket_and_match_hostname
ssl_sock = ssl_wrap_socket(
File "D:\software\python\python310\lib\site-packages\urllib3\util\ssl_.py", line 469, in ssl_wrap_socket
ssl_sock = _ssl_wrap_socket_impl(sock, context, tls_in_tls, server_hostname)
File "D:\software\python\python310\lib\site-packages\urllib3\util\ssl_.py", line 513, in _ssl_wrap_socket_impl
return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
File "D:\software\python\python310\lib\ssl.py", line 513, in wrap_socket
return self.sslsocket_class._create(
File "D:\software\python\python310\lib\ssl.py", line 1071, in _create
self.do_handshake()
File "D:\software\python\python310\lib\ssl.py", line 1342, in do_handshake
self._sslobj.do_handshake()
FileNotFoundError: [Errno 2] No such file or directory
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\software\python\python310\lib\site-packages\requests\adapters.py", line 486, in send
resp = conn.urlopen(
File "D:\software\python\python310\lib\site-packages\urllib3\connectionpool.py", line 844, in urlopen
retries = retries.increment(
File "D:\software\python\python310\lib\site-packages\urllib3\util\retry.py", line 470, in increment
raise reraise(type(error), error, _stacktrace)
File "D:\software\python\python310\lib\site-packages\urllib3\util\util.py", line 38, in reraise
raise value.with_traceback(tb)
File "D:\software\python\python310\lib\site-packages\urllib3\connectionpool.py", line 776, in urlopen
self._prepare_proxy(conn)
File "D:\software\python\python310\lib\site-packages\urllib3\connectionpool.py", line 1041, in _prepare_proxy
conn.connect()
File "D:\software\python\python310\lib\site-packages\urllib3\connection.py", line 642, in connect
sock_and_verified = _ssl_wrap_socket_and_match_hostname(
File "D:\software\python\python310\lib\site-packages\urllib3\connection.py", line 783, in _ssl_wrap_socket_and_match_hostname
ssl_sock = ssl_wrap_socket(
File "D:\software\python\python310\lib\site-packages\urllib3\util\ssl_.py", line 469, in ssl_wrap_socket
ssl_sock = _ssl_wrap_socket_impl(sock, context, tls_in_tls, server_hostname)
File "D:\software\python\python310\lib\site-packages\urllib3\util\ssl_.py", line 513, in _ssl_wrap_socket_impl
return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
File "D:\software\python\python310\lib\ssl.py", line 513, in wrap_socket
return self.sslsocket_class._create(
File "D:\software\python\python310\lib\ssl.py", line 1071, in _create
self.do_handshake()
File "D:\software\python\python310\lib\ssl.py", line 1342, in do_handshake
self._sslobj.do_handshake()
urllib3.exceptions.ProtocolError: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\mycode\python\seller-project\main.py", line 22, in <module>
cs.get_result(item_id)
File "D:\mycode\python\seller-project\crawl\crawler_seller.py", line 108, in get_result
json_result = self.post_url(json_data)
File "D:\mycode\python\seller-project\crawl\crawler_seller.py", line 63, in post_url
response = requests.post(
File "D:\software\python\python310\lib\site-packages\requests\api.py", line 115, in post
return request("post", url, data=data, json=json, **kwargs)
File "D:\software\python\python310\lib\site-packages\requests\api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
File "D:\software\python\python310\lib\site-packages\requests\sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
File "D:\software\python\python310\lib\site-packages\requests\sessions.py", line 703, in send
r = adapter.send(request, **kwargs)
File "D:\software\python\python310\lib\site-packages\requests\adapters.py", line 501, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))
urllib3.exceptions.SSLError: EOF occurred in violation of protocol (_ssl.c:1007)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "D:\software\python\python310\lib\site-packages\requests\adapters.py", line 486, in send
resp = conn.urlopen(
File "D:\software\python\python310\lib\site-packages\urllib3\connectionpool.py", line 844, in urlopen
retries = retries.increment(
File "D:\software\python\python310\lib\site-packages\urllib3\util\retry.py", line 515, in increment
raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type]
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='seller.ozon.ru', port=443): Max retries exceeded with url: /api/site/seller-analytics/what_to_sell/data/v3 (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1007)')))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\mycode\python\seller-project\main.py", line 22, in <module>
cs.get_result(item_id)
File "D:\mycode\python\seller-project\crawl\crawler_seller.py", line 108, in get_result
json_result = self.post_url(json_data)
File "D:\mycode\python\seller-project\crawl\crawler_seller.py", line 63, in post_url
response = requests.post(
File "D:\software\python\python310\lib\site-packages\requests\api.py", line 115, in post
return request("post", url, data=data, json=json, **kwargs)
File "D:\software\python\python310\lib\site-packages\requests\api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
File "D:\software\python\python310\lib\site-packages\requests\sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
File "D:\software\python\python310\lib\site-packages\requests\sessions.py", line 703, in send
r = adapter.send(request, **kwargs)
File "D:\software\python\python310\lib\site-packages\requests\adapters.py", line 517, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='seller.ozon.ru', port=443): Max retries exceeded with url: /api/site/seller-analytics/what_to_sell/data/v3 (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1007)')))
Traceback (most recent call last):
File "D:\software\python\python310\lib\site-packages\urllib3\connectionpool.py", line 790, in urlopen
response = self._make_request(
File "D:\software\python\python310\lib\site-packages\urllib3\connectionpool.py", line 536, in _make_request
response = conn.getresponse()
File "D:\software\python\python310\lib\site-packages\urllib3\connection.py", line 461, in getresponse
httplib_response = super().getresponse()
File "D:\software\python\python310\lib\http\client.py", line 1375, in getresponse
response.begin()
File "D:\software\python\python310\lib\http\client.py", line 318, in begin
version, status, reason = self._read_status()
File "D:\software\python\python310\lib\http\client.py", line 287, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\software\python\python310\lib\site-packages\requests\adapters.py", line 486, in send
resp = conn.urlopen(
File "D:\software\python\python310\lib\site-packages\urllib3\connectionpool.py", line 844, in urlopen
retries = retries.increment(
File "D:\software\python\python310\lib\site-packages\urllib3\util\retry.py", line 470, in increment
raise reraise(type(error), error, _stacktrace)
File "D:\software\python\python310\lib\site-packages\urllib3\util\util.py", line 38, in reraise
raise value.with_traceback(tb)
File "D:\software\python\python310\lib\site-packages\urllib3\connectionpool.py", line 790, in urlopen
response = self._make_request(
File "D:\software\python\python310\lib\site-packages\urllib3\connectionpool.py", line 536, in _make_request
response = conn.getresponse()
File "D:\software\python\python310\lib\site-packages\urllib3\connection.py", line 461, in getresponse
httplib_response = super().getresponse()
File "D:\software\python\python310\lib\http\client.py", line 1375, in getresponse
response.begin()
File "D:\software\python\python310\lib\http\client.py", line 318, in begin
version, status, reason = self._read_status()
File "D:\software\python\python310\lib\http\client.py", line 287, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\mycode\python\seller-project\main.py", line 22, in <module>
cs.get_result(item_id)
File "D:\mycode\python\seller-project\crawl\crawler_seller.py", line 112, in get_result
json_result = self.post_url(json_data)
File "D:\mycode\python\seller-project\crawl\crawler_seller.py", line 63, in post_url
response = requests.post(
File "D:\software\python\python310\lib\site-packages\requests\api.py", line 115, in post
return request("post", url, data=data, json=json, **kwargs)
File "D:\software\python\python310\lib\site-packages\requests\api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
File "D:\software\python\python310\lib\site-packages\requests\sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
File "D:\software\python\python310\lib\site-packages\requests\sessions.py", line 703, in send
r = adapter.send(request, **kwargs)
File "D:\software\python\python310\lib\site-packages\requests\adapters.py", line 501, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))