From c26270146f42b6e33938959f72c3f94444c30c22 Mon Sep 17 00:00:00 2001 From: Relakkes Date: Sat, 13 Apr 2024 18:04:33 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Dip=E4=BB=A3=E7=90=86?= =?UTF-8?q?=E6=B1=A0=E8=AE=BE=E8=AE=A1bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- proxy/proxy_ip_pool.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proxy/proxy_ip_pool.py b/proxy/proxy_ip_pool.py index febc39e..f8cb257 100644 --- a/proxy/proxy_ip_pool.py +++ b/proxy/proxy_ip_pool.py @@ -70,10 +70,10 @@ class ProxyIpPool: await self._reload_proxies() proxy = random.choice(self.proxy_list) + self.proxy_list.remove(proxy) # 取出来一个IP就应该移出掉 if self.enable_validate_ip: if not await self._is_valid_proxy(proxy): raise Exception("[ProxyIpPool.get_proxy] current ip invalid and again get it") - self.proxy_list.remove(proxy) return proxy async def _reload_proxies(self):