xtn-tools-pro 1.0.0.0.8__py3-none-any.whl → 1.0.0.1.0__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
@@ -195,8 +195,12 @@ class ProxyPool:
195
195
  :return:
196
196
  """
197
197
  try:
198
- self.__redis_pool.set(proxy_v, "999999")
199
- self.__log("设置不可用的代理 {proxy_v} 999999".format(proxy_v=proxy_v))
198
+ proxy_val_list = list(self.__redis_pool.get_all_key("{}*".format(self.__redisProxyName)))
199
+ for proxy_val in proxy_val_list:
200
+ if proxy_v in proxy_val:
201
+ self.__redis_pool.set(proxy_val, "999999")
202
+ self.__log("设置不可用的代理 {proxy_v} 为 999999".format(proxy_v=proxy_v))
203
+ return
200
204
  except Exception as e:
201
205
  self.__log("爬虫手动传入代理:{e}".format(e=e))
202
206
 
@@ -204,4 +208,4 @@ class ProxyPool:
204
208
  if __name__ == '__main__':
205
209
  p = ProxyPool(ip="127.0.0.1", port=6379, db=0, user_pass="xtn-kk", XiaoXiangProxyAppKey="1101384562594172928",
206
210
  XiaoXiangProxyAppSecret="PJ0QBWML")
207
- print(p.get_proxy())
211
+ print(p.set_proxy_error("http://49.83.105.188:32300"))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: xtn-tools-pro
3
- Version: 1.0.0.0.8
3
+ Version: 1.0.0.1.0
4
4
  Summary: xtn 开发工具
5
5
  Author: xtn
6
6
  Author-email: czw011122@163.com
@@ -6,7 +6,7 @@ xtn_tools_pro/db/MongoDB.py,sha256=zQLfZ-mhZWCFgY3dPF3dRAzAR3C8hrXO_yLZw9cUUUY,5
6
6
  xtn_tools_pro/db/MysqlDB.py,sha256=SBJrcjbZdxmtTKPGwl57NthPhs4uX8J3P6o_rK01O4k,13373
7
7
  xtn_tools_pro/db/RedisDB.py,sha256=ep32Yj8AAkUHRshSBhKsdl06UwO7Z-gQJLaezspVRKw,6053
8
8
  xtn_tools_pro/db/__init__.py,sha256=Zg91UWS02TO0Ba_0AY56s0oabRy93xLNFkpIIL_6mMM,416
9
- xtn_tools_pro/proxy/XiaoXiangProxy.py,sha256=6jzGgN2t2zLPIKbSgN8seixwDLY4IjoZvB26f8yTUME,9848
9
+ xtn_tools_pro/proxy/XiaoXiangProxy.py,sha256=ESSz1gRevIWloBHZswPt9pGTHUe4R4k70M63UBy4kxU,10119
10
10
  xtn_tools_pro/proxy/__init__.py,sha256=WRwh6s2lruMu5buh0ejo9EK54kWT_VQhCsFGNFAmcyo,418
11
11
  xtn_tools_pro/proxy/proxy.py,sha256=No6E1pFY5yx2F4976pXPrLtq-QEVp79KupzcufjSN58,8703
12
12
  xtn_tools_pro/utils/__init__.py,sha256=I1_n_NP23F2lBqlF4EOlnOdLYxM8M4pbn63UhJN1hRE,418
@@ -17,8 +17,8 @@ xtn_tools_pro/utils/log.py,sha256=8CRMiY7Q9LWGJLhfL0YfpANBwLets9f2qWfMOe5PpNM,81
17
17
  xtn_tools_pro/utils/retry.py,sha256=0wjHsR5DBBKpv4naMfxiky8kprrZes4WURIfFQ4H708,1657
18
18
  xtn_tools_pro/utils/sql.py,sha256=EAKzbkZP7Q09j15Gm6o0_uq0qgQmcCQT6EAawbpp4v0,6263
19
19
  xtn_tools_pro/utils/time_utils.py,sha256=TUtzG61PeVYXhaQd6pBrXAdlz7tBispNIRQRcGhE2No,4859
20
- xtn_tools_pro-1.0.0.0.8.dist-info/LICENSE,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
21
- xtn_tools_pro-1.0.0.0.8.dist-info/METADATA,sha256=CN33o7GbV3bBP0HYYrlBem6vBcoHD6u64GRnlEBENKQ,431
22
- xtn_tools_pro-1.0.0.0.8.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
23
- xtn_tools_pro-1.0.0.0.8.dist-info/top_level.txt,sha256=jyB3FLDEr8zE1U7wHczTgIbvUpALhR-ULF7RVEO7O2U,14
24
- xtn_tools_pro-1.0.0.0.8.dist-info/RECORD,,
20
+ xtn_tools_pro-1.0.0.1.0.dist-info/LICENSE,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
21
+ xtn_tools_pro-1.0.0.1.0.dist-info/METADATA,sha256=VJvhmoI2ca28ktIwG8MDz72fwICroxYC5xUu-pNWLCE,431
22
+ xtn_tools_pro-1.0.0.1.0.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
23
+ xtn_tools_pro-1.0.0.1.0.dist-info/top_level.txt,sha256=jyB3FLDEr8zE1U7wHczTgIbvUpALhR-ULF7RVEO7O2U,14
24
+ xtn_tools_pro-1.0.0.1.0.dist-info/RECORD,,