xtn-tools-pro 1.0.0.1.5__tar.gz → 1.0.0.1.7__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (27) hide show
  1. {xtn-tools-pro-1.0.0.1.5/xtn_tools_pro.egg-info → xtn-tools-pro-1.0.0.1.7}/PKG-INFO +1 -1
  2. {xtn-tools-pro-1.0.0.1.5 → xtn-tools-pro-1.0.0.1.7}/setup.py +3 -2
  3. {xtn-tools-pro-1.0.0.1.5 → xtn-tools-pro-1.0.0.1.7}/xtn_tools_pro/proxy/XiaoXiangProxy.py +18 -13
  4. {xtn-tools-pro-1.0.0.1.5 → xtn-tools-pro-1.0.0.1.7}/xtn_tools_pro/utils/helpers.py +5 -1
  5. {xtn-tools-pro-1.0.0.1.5 → xtn-tools-pro-1.0.0.1.7/xtn_tools_pro.egg-info}/PKG-INFO +1 -1
  6. {xtn-tools-pro-1.0.0.1.5 → xtn-tools-pro-1.0.0.1.7}/xtn_tools_pro.egg-info/requires.txt +1 -0
  7. {xtn-tools-pro-1.0.0.1.5 → xtn-tools-pro-1.0.0.1.7}/LICENSE +0 -0
  8. {xtn-tools-pro-1.0.0.1.5 → xtn-tools-pro-1.0.0.1.7}/README.md +0 -0
  9. {xtn-tools-pro-1.0.0.1.5 → xtn-tools-pro-1.0.0.1.7}/setup.cfg +0 -0
  10. {xtn-tools-pro-1.0.0.1.5 → xtn-tools-pro-1.0.0.1.7}/xtn_tools_pro/__init__.py +0 -0
  11. {xtn-tools-pro-1.0.0.1.5 → xtn-tools-pro-1.0.0.1.7}/xtn_tools_pro/db/MongoDB.py +0 -0
  12. {xtn-tools-pro-1.0.0.1.5 → xtn-tools-pro-1.0.0.1.7}/xtn_tools_pro/db/MysqlDB.py +0 -0
  13. {xtn-tools-pro-1.0.0.1.5 → xtn-tools-pro-1.0.0.1.7}/xtn_tools_pro/db/RedisDB.py +0 -0
  14. {xtn-tools-pro-1.0.0.1.5 → xtn-tools-pro-1.0.0.1.7}/xtn_tools_pro/db/__init__.py +0 -0
  15. {xtn-tools-pro-1.0.0.1.5 → xtn-tools-pro-1.0.0.1.7}/xtn_tools_pro/proxy/__init__.py +0 -0
  16. {xtn-tools-pro-1.0.0.1.5 → xtn-tools-pro-1.0.0.1.7}/xtn_tools_pro/proxy/proxy.py +0 -0
  17. {xtn-tools-pro-1.0.0.1.5 → xtn-tools-pro-1.0.0.1.7}/xtn_tools_pro/tools.py +0 -0
  18. {xtn-tools-pro-1.0.0.1.5 → xtn-tools-pro-1.0.0.1.7}/xtn_tools_pro/utils/__init__.py +0 -0
  19. {xtn-tools-pro-1.0.0.1.5 → xtn-tools-pro-1.0.0.1.7}/xtn_tools_pro/utils/crypto.py +0 -0
  20. {xtn-tools-pro-1.0.0.1.5 → xtn-tools-pro-1.0.0.1.7}/xtn_tools_pro/utils/file_utils.py +0 -0
  21. {xtn-tools-pro-1.0.0.1.5 → xtn-tools-pro-1.0.0.1.7}/xtn_tools_pro/utils/log.py +0 -0
  22. {xtn-tools-pro-1.0.0.1.5 → xtn-tools-pro-1.0.0.1.7}/xtn_tools_pro/utils/retry.py +0 -0
  23. {xtn-tools-pro-1.0.0.1.5 → xtn-tools-pro-1.0.0.1.7}/xtn_tools_pro/utils/sql.py +0 -0
  24. {xtn-tools-pro-1.0.0.1.5 → xtn-tools-pro-1.0.0.1.7}/xtn_tools_pro/utils/time_utils.py +0 -0
  25. {xtn-tools-pro-1.0.0.1.5 → xtn-tools-pro-1.0.0.1.7}/xtn_tools_pro.egg-info/SOURCES.txt +0 -0
  26. {xtn-tools-pro-1.0.0.1.5 → xtn-tools-pro-1.0.0.1.7}/xtn_tools_pro.egg-info/dependency_links.txt +0 -0
  27. {xtn-tools-pro-1.0.0.1.5 → xtn-tools-pro-1.0.0.1.7}/xtn_tools_pro.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: xtn-tools-pro
3
- Version: 1.0.0.1.5
3
+ Version: 1.0.0.1.7
4
4
  Summary: xtn 开发工具
5
5
  Author: xtn
6
6
  Author-email: czw011122@163.com
@@ -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.5", # 版本
18
+ version="1.0.0.1.7", # 版本
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
  记录日志
@@ -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
- # 手动绑定终端IP
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()
@@ -163,16 +168,16 @@ class ProxyPool:
163
168
  self.__get_api_proxy()
164
169
  time.sleep(1)
165
170
  # 判断时间是否超过当前23:59分时间戳
166
- t_a = get_time_now_timestamp(is_time_10=True)
167
- if t_a >= self.__now_day59_timestamp:
168
- self.__log(
169
- "时间23:59,结束循环,{t} {a} {a_v} {b} {b_v}".format(t=int(time.time()),
170
- a=type(t_a),
171
- a_v=t_a,
172
- b=type(self.__now_day59_timestamp),
173
- b_v=self.__now_day59_timestamp)
174
- )
175
- break
171
+ # t_a = get_time_now_timestamp(is_time_10=True)
172
+ # if t_a >= self.__now_day59_timestamp:
173
+ # self.__log(
174
+ # "时间23:59,结束循环,{t} {a} {a_v} {b} {b_v}".format(t=int(time.time()),
175
+ # a=type(t_a),
176
+ # a_v=t_a,
177
+ # b=type(self.__now_day59_timestamp),
178
+ # b_v=self.__now_day59_timestamp)
179
+ # )
180
+ # break
176
181
  except Exception as eee:
177
182
  self.__log("程序异常报错:{eee} {b_t} {b_v}".format(eee=eee,
178
183
  b_t=type(self.__now_day59_timestamp),
@@ -122,5 +122,9 @@ def get_build_url_with_params(url, params):
122
122
  full_url = url + "?" + encoded_params
123
123
  return full_url
124
124
 
125
+
126
+
125
127
  if __name__ == '__main__':
126
- print(get_uuid(4))
128
+ # print(get_uuid(4))
129
+ from faker import Faker
130
+
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: xtn-tools-pro
3
- Version: 1.0.0.1.5
3
+ Version: 1.0.0.1.7
4
4
  Summary: xtn 开发工具
5
5
  Author: xtn
6
6
  Author-email: czw011122@163.com
@@ -4,3 +4,4 @@ pymysql
4
4
  dbutils
5
5
  colorlog
6
6
  requests
7
+ Faker