xtn-tools-pro 1.0.1.2.3__py3-none-any.whl → 1.0.1.2.5__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of xtn-tools-pro might be problematic. Click here for more details.
- xtn_tools_pro/task_pro/go_fun_v3.py +27 -0
- xtn_tools_pro/utils/crypto.py +4 -3
- {xtn_tools_pro-1.0.1.2.3.dist-info → xtn_tools_pro-1.0.1.2.5.dist-info}/METADATA +1 -1
- {xtn_tools_pro-1.0.1.2.3.dist-info → xtn_tools_pro-1.0.1.2.5.dist-info}/RECORD +8 -8
- {xtn_tools_pro-1.0.1.2.3.dist-info → xtn_tools_pro-1.0.1.2.5.dist-info}/LICENSE +0 -0
- {xtn_tools_pro-1.0.1.2.3.dist-info → xtn_tools_pro-1.0.1.2.5.dist-info}/WHEEL +0 -0
- {xtn_tools_pro-1.0.1.2.3.dist-info → xtn_tools_pro-1.0.1.2.5.dist-info}/entry_points.txt +0 -0
- {xtn_tools_pro-1.0.1.2.3.dist-info → xtn_tools_pro-1.0.1.2.5.dist-info}/top_level.txt +0 -0
@@ -370,6 +370,33 @@ class GoFunTaskV3:
|
|
370
370
|
self.logger.critical(f"get_download_task 获取下载任务 {self.download_queue, block, timeout} 报错 {e}")
|
371
371
|
return False
|
372
372
|
|
373
|
+
def get_download_task_list(self, block=False, timeout=1, get_cnt=1):
|
374
|
+
"""
|
375
|
+
获取下载任务
|
376
|
+
:param block: 是否阻塞等待 True阻塞/False不阻塞
|
377
|
+
:param timeout:
|
378
|
+
:param get_cnt: 获取任务的个数
|
379
|
+
:return:
|
380
|
+
error_code:1001 队列为空;
|
381
|
+
"""
|
382
|
+
task_item_list = []
|
383
|
+
for _ in range(get_cnt):
|
384
|
+
try:
|
385
|
+
task_item = self.download_queue.get(block=block, timeout=timeout)
|
386
|
+
task_item["success"] = True
|
387
|
+
task_item_list.append(task_item)
|
388
|
+
except queue.Empty as e:
|
389
|
+
# 捕获队列为空的异常
|
390
|
+
# self.logger.info(f"get_download_task 获取下载任务 {download_queue, block, timeout} 报错 队列为空: {e}")
|
391
|
+
# return {"error": "队列为空", "error_code": 1001}
|
392
|
+
break
|
393
|
+
except Exception as e:
|
394
|
+
self.logger.critical(f"get_download_task 获取下载任务 {self.download_queue, block, timeout} 报错 {e}")
|
395
|
+
# return False
|
396
|
+
break
|
397
|
+
|
398
|
+
return task_item_list
|
399
|
+
|
373
400
|
def update_upload_task(self, task_item):
|
374
401
|
"""
|
375
402
|
更新任务
|
xtn_tools_pro/utils/crypto.py
CHANGED
@@ -167,13 +167,14 @@ def img_str_to_bytes(img_data: str):
|
|
167
167
|
return img_data.encode('latin1')
|
168
168
|
|
169
169
|
|
170
|
-
def get_2FA(secret):
|
170
|
+
def get_2FA(secret, interval=30):
|
171
171
|
"""
|
172
172
|
计算 2FA
|
173
173
|
:param secret:
|
174
|
+
:param interval:有效期 单位秒
|
174
175
|
:return:
|
175
176
|
"""
|
176
|
-
totp = pyotp.TOTP(secret)
|
177
|
+
totp = pyotp.TOTP(secret, interval=interval)
|
177
178
|
return str(totp.now())
|
178
179
|
|
179
180
|
|
@@ -193,4 +194,4 @@ class A8:
|
|
193
194
|
|
194
195
|
|
195
196
|
if __name__ == '__main__':
|
196
|
-
print(get_2FA('ninqzrh367u3iahpi2mum36bgfvouv5m'))
|
197
|
+
print(get_2FA('ninqzrh367u3iahpi2mum36bgfvouv5m',3600))
|
@@ -51,10 +51,10 @@ xtn_tools_pro/task_pro/__init__.py,sha256=nK3U47hWwE1H875ieEToH9r-jzXHS-PXk8cDst
|
|
51
51
|
xtn_tools_pro/task_pro/go_fun.py,sha256=hWEt2uJ9FCvJH7PhVZttS-11A7J6zbRKwX7c5YLYQag,19144
|
52
52
|
xtn_tools_pro/task_pro/go_fun_air_v1.py,sha256=25gHmW5aAV6nMY9Y6-wD7uQ_wqE39dr-eaegqVbYKM8,11035
|
53
53
|
xtn_tools_pro/task_pro/go_fun_v2.py,sha256=SgcXgtEBGSVL1V2LyqO0z8Md2H8JZxucYrLLIwqtiLM,18489
|
54
|
-
xtn_tools_pro/task_pro/go_fun_v3.py,sha256=
|
54
|
+
xtn_tools_pro/task_pro/go_fun_v3.py,sha256=blP3pW2rGokj3p7kIbUJMVg27JHJMaEPouMzpmbEraE,20773
|
55
55
|
xtn_tools_pro/utils/__init__.py,sha256=I1_n_NP23F2lBqlF4EOlnOdLYxM8M4pbn63UhJN1hRE,418
|
56
56
|
xtn_tools_pro/utils/audio_video.py,sha256=3Im3tGOW6IbmqDcrE1SJUg6eGyLGEyq11Qu6TCutJJw,1115
|
57
|
-
xtn_tools_pro/utils/crypto.py,sha256=
|
57
|
+
xtn_tools_pro/utils/crypto.py,sha256=kjbmkH6oj3guegDyzD6aW8rDOpKhApma1VnQN02KfcE,5157
|
58
58
|
xtn_tools_pro/utils/file_utils.py,sha256=vsUgds8I8Z2pL9a4oCv1q0JrZsDP29qLyLyGVqj5sX8,3311
|
59
59
|
xtn_tools_pro/utils/helpers.py,sha256=0CTMY7wfSQR_DC9-v1lkKQLpWcB1FL9V_kw_5DOcZ40,4454
|
60
60
|
xtn_tools_pro/utils/log.py,sha256=DTUWwi5pvZrwwq94odGnR0JBhfStrc6SxcJREqf2Ls4,11031
|
@@ -63,9 +63,9 @@ xtn_tools_pro/utils/set_data.py,sha256=BzCLbEDO83csDHBey8kP7SoE6kx6EjqE7OqRBY7k8
|
|
63
63
|
xtn_tools_pro/utils/shell.py,sha256=s6sJedxLLQokcI1hF5YSD3qgGUPK0brNcP-D3-yv54I,3790
|
64
64
|
xtn_tools_pro/utils/sql.py,sha256=EAKzbkZP7Q09j15Gm6o0_uq0qgQmcCQT6EAawbpp4v0,6263
|
65
65
|
xtn_tools_pro/utils/time_utils.py,sha256=TUtzG61PeVYXhaQd6pBrXAdlz7tBispNIRQRcGhE2No,4859
|
66
|
-
xtn_tools_pro-1.0.1.2.
|
67
|
-
xtn_tools_pro-1.0.1.2.
|
68
|
-
xtn_tools_pro-1.0.1.2.
|
69
|
-
xtn_tools_pro-1.0.1.2.
|
70
|
-
xtn_tools_pro-1.0.1.2.
|
71
|
-
xtn_tools_pro-1.0.1.2.
|
66
|
+
xtn_tools_pro-1.0.1.2.5.dist-info/LICENSE,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
67
|
+
xtn_tools_pro-1.0.1.2.5.dist-info/METADATA,sha256=FjTsuJ5GoGrFJGIUopSTRWscRpRLNCiPqqeeyGO2H4M,574
|
68
|
+
xtn_tools_pro-1.0.1.2.5.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
69
|
+
xtn_tools_pro-1.0.1.2.5.dist-info/entry_points.txt,sha256=t8CtXWOgw7nRDW3XNlZh8MT_P4l8EzsFnyWi5b3ovrc,68
|
70
|
+
xtn_tools_pro-1.0.1.2.5.dist-info/top_level.txt,sha256=jyB3FLDEr8zE1U7wHczTgIbvUpALhR-ULF7RVEO7O2U,14
|
71
|
+
xtn_tools_pro-1.0.1.2.5.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|