爬虫新问题

发布时间 2023-12-20 22:12:55作者: zhangqi0828

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')))