xtn-tools-pro 1.0.0.1.4__tar.gz → 1.0.0.1.6__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {xtn-tools-pro-1.0.0.1.4/xtn_tools_pro.egg-info → xtn-tools-pro-1.0.0.1.6}/PKG-INFO +1 -1
- {xtn-tools-pro-1.0.0.1.4 → xtn-tools-pro-1.0.0.1.6}/setup.py +3 -2
- {xtn-tools-pro-1.0.0.1.4 → xtn-tools-pro-1.0.0.1.6}/xtn_tools_pro/proxy/XiaoXiangProxy.py +9 -4
- {xtn-tools-pro-1.0.0.1.4 → xtn-tools-pro-1.0.0.1.6}/xtn_tools_pro/utils/helpers.py +5 -1
- {xtn-tools-pro-1.0.0.1.4 → xtn-tools-pro-1.0.0.1.6/xtn_tools_pro.egg-info}/PKG-INFO +1 -1
- {xtn-tools-pro-1.0.0.1.4 → xtn-tools-pro-1.0.0.1.6}/xtn_tools_pro.egg-info/requires.txt +1 -0
- {xtn-tools-pro-1.0.0.1.4 → xtn-tools-pro-1.0.0.1.6}/LICENSE +0 -0
- {xtn-tools-pro-1.0.0.1.4 → xtn-tools-pro-1.0.0.1.6}/README.md +0 -0
- {xtn-tools-pro-1.0.0.1.4 → xtn-tools-pro-1.0.0.1.6}/setup.cfg +0 -0
- {xtn-tools-pro-1.0.0.1.4 → xtn-tools-pro-1.0.0.1.6}/xtn_tools_pro/__init__.py +0 -0
- {xtn-tools-pro-1.0.0.1.4 → xtn-tools-pro-1.0.0.1.6}/xtn_tools_pro/db/MongoDB.py +0 -0
- {xtn-tools-pro-1.0.0.1.4 → xtn-tools-pro-1.0.0.1.6}/xtn_tools_pro/db/MysqlDB.py +0 -0
- {xtn-tools-pro-1.0.0.1.4 → xtn-tools-pro-1.0.0.1.6}/xtn_tools_pro/db/RedisDB.py +0 -0
- {xtn-tools-pro-1.0.0.1.4 → xtn-tools-pro-1.0.0.1.6}/xtn_tools_pro/db/__init__.py +0 -0
- {xtn-tools-pro-1.0.0.1.4 → xtn-tools-pro-1.0.0.1.6}/xtn_tools_pro/proxy/__init__.py +0 -0
- {xtn-tools-pro-1.0.0.1.4 → xtn-tools-pro-1.0.0.1.6}/xtn_tools_pro/proxy/proxy.py +0 -0
- {xtn-tools-pro-1.0.0.1.4 → xtn-tools-pro-1.0.0.1.6}/xtn_tools_pro/tools.py +0 -0
- {xtn-tools-pro-1.0.0.1.4 → xtn-tools-pro-1.0.0.1.6}/xtn_tools_pro/utils/__init__.py +0 -0
- {xtn-tools-pro-1.0.0.1.4 → xtn-tools-pro-1.0.0.1.6}/xtn_tools_pro/utils/crypto.py +0 -0
- {xtn-tools-pro-1.0.0.1.4 → xtn-tools-pro-1.0.0.1.6}/xtn_tools_pro/utils/file_utils.py +0 -0
- {xtn-tools-pro-1.0.0.1.4 → xtn-tools-pro-1.0.0.1.6}/xtn_tools_pro/utils/log.py +0 -0
- {xtn-tools-pro-1.0.0.1.4 → xtn-tools-pro-1.0.0.1.6}/xtn_tools_pro/utils/retry.py +0 -0
- {xtn-tools-pro-1.0.0.1.4 → xtn-tools-pro-1.0.0.1.6}/xtn_tools_pro/utils/sql.py +0 -0
- {xtn-tools-pro-1.0.0.1.4 → xtn-tools-pro-1.0.0.1.6}/xtn_tools_pro/utils/time_utils.py +0 -0
- {xtn-tools-pro-1.0.0.1.4 → xtn-tools-pro-1.0.0.1.6}/xtn_tools_pro.egg-info/SOURCES.txt +0 -0
- {xtn-tools-pro-1.0.0.1.4 → xtn-tools-pro-1.0.0.1.6}/xtn_tools_pro.egg-info/dependency_links.txt +0 -0
- {xtn-tools-pro-1.0.0.1.4 → xtn-tools-pro-1.0.0.1.6}/xtn_tools_pro.egg-info/top_level.txt +0 -0
@@ -15,7 +15,7 @@ with open("README.md", "r") as f:
|
|
15
15
|
|
16
16
|
setuptools.setup(
|
17
17
|
name="xtn-tools-pro", # 模块名称
|
18
|
-
version="1.0.0.1.
|
18
|
+
version="1.0.0.1.6", # 版本
|
19
19
|
author="xtn", # 作者
|
20
20
|
author_email="czw011122@163.com", # 作者邮箱
|
21
21
|
description="xtn 开发工具", # 模块简介
|
@@ -33,7 +33,8 @@ setuptools.setup(
|
|
33
33
|
"pymysql",
|
34
34
|
"dbutils",
|
35
35
|
"colorlog",
|
36
|
-
"requests"
|
36
|
+
"requests",
|
37
|
+
"Faker"
|
37
38
|
],
|
38
39
|
python_requires='>=3',
|
39
40
|
)
|
@@ -55,6 +55,8 @@ class ProxyPool:
|
|
55
55
|
# nowDate = str(datetime.datetime.now().strftime('%Y_%m_%d'))
|
56
56
|
# logger.add(loggerPath.format(t=nowDate))
|
57
57
|
|
58
|
+
self.bind_ip()
|
59
|
+
|
58
60
|
def __log(self, text):
|
59
61
|
"""
|
60
62
|
记录日志
|
@@ -74,7 +76,7 @@ class ProxyPool:
|
|
74
76
|
# 获取时间
|
75
77
|
time_out = proxy_val.split(":")[-1]
|
76
78
|
# 获取使用次数
|
77
|
-
proxy_val_count = self.__redis_pool.get(proxy_val)
|
79
|
+
proxy_val_count = int(self.__redis_pool.get(proxy_val))
|
78
80
|
if int(time_out) + self.__usage_time < get_time_now_timestamp(is_time_10=True):
|
79
81
|
del_state = self.__redis_pool.delete(proxy_val)
|
80
82
|
self.__log(
|
@@ -150,12 +152,15 @@ class ProxyPool:
|
|
150
152
|
except Exception as e:
|
151
153
|
self.__log("获取小象代理报错:{e}".format(e=e))
|
152
154
|
|
155
|
+
def bind_ip(self):
|
156
|
+
# 手动绑定终端IP
|
157
|
+
response = requests.get(url=self.__XiaoXiangAutoBinding, verify=False, timeout=3)
|
158
|
+
self.__log(response.text)
|
159
|
+
|
153
160
|
def run(self):
|
154
161
|
while True:
|
155
162
|
try:
|
156
|
-
|
157
|
-
response = requests.get(url=self.__XiaoXiangAutoBinding, verify=False, timeout=3)
|
158
|
-
self.__log(response.text)
|
163
|
+
self.bind_ip()
|
159
164
|
while True:
|
160
165
|
# 检查代理
|
161
166
|
self.__check_proxy()
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{xtn-tools-pro-1.0.0.1.4 → xtn-tools-pro-1.0.0.1.6}/xtn_tools_pro.egg-info/dependency_links.txt
RENAMED
File without changes
|
File without changes
|