fix process exception
This commit is contained in:
parent
adf61f2a9e
commit
3fae0091b3
|
@ -44,6 +44,7 @@ class ProxyMiddleware:
|
|||
def process_exception(self, request, exception, spider):
|
||||
# 处理发生异常的请求
|
||||
self._handle_proxy_failure(request.meta['proxy'], spider)
|
||||
spider.info(f"Changing proxy to {request.meta['proxy']} due to exception: {exception}")
|
||||
# 重新调度请求
|
||||
return request
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user