p115client 0.0.5.6.6__tar.gz → 0.0.5.6.7__tar.gz
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.
- {p115client-0.0.5.6.6 → p115client-0.0.5.6.7}/PKG-INFO +1 -1
- {p115client-0.0.5.6.6 → p115client-0.0.5.6.7}/p115client/client.py +8 -31
- {p115client-0.0.5.6.6 → p115client-0.0.5.6.7}/p115client/tool/fs_files.py +4 -4
- {p115client-0.0.5.6.6 → p115client-0.0.5.6.7}/pyproject.toml +1 -1
- {p115client-0.0.5.6.6 → p115client-0.0.5.6.7}/LICENSE +0 -0
- {p115client-0.0.5.6.6 → p115client-0.0.5.6.7}/p115client/__init__.py +0 -0
- {p115client-0.0.5.6.6 → p115client-0.0.5.6.7}/p115client/_upload.py +0 -0
- {p115client-0.0.5.6.6 → p115client-0.0.5.6.7}/p115client/const.py +0 -0
- {p115client-0.0.5.6.6 → p115client-0.0.5.6.7}/p115client/exception.py +0 -0
- {p115client-0.0.5.6.6 → p115client-0.0.5.6.7}/p115client/py.typed +0 -0
- {p115client-0.0.5.6.6 → p115client-0.0.5.6.7}/p115client/tool/__init__.py +0 -0
- {p115client-0.0.5.6.6 → p115client-0.0.5.6.7}/p115client/tool/download.py +0 -0
- {p115client-0.0.5.6.6 → p115client-0.0.5.6.7}/p115client/tool/edit.py +0 -0
- {p115client-0.0.5.6.6 → p115client-0.0.5.6.7}/p115client/tool/export_dir.py +0 -0
- {p115client-0.0.5.6.6 → p115client-0.0.5.6.7}/p115client/tool/iterdir.py +0 -0
- {p115client-0.0.5.6.6 → p115client-0.0.5.6.7}/p115client/tool/life.py +0 -0
- {p115client-0.0.5.6.6 → p115client-0.0.5.6.7}/p115client/tool/pool.py +0 -0
- {p115client-0.0.5.6.6 → p115client-0.0.5.6.7}/p115client/tool/request.py +0 -0
- {p115client-0.0.5.6.6 → p115client-0.0.5.6.7}/p115client/tool/upload.py +0 -0
- {p115client-0.0.5.6.6 → p115client-0.0.5.6.7}/p115client/tool/xys.py +0 -0
- {p115client-0.0.5.6.6 → p115client-0.0.5.6.7}/p115client/type.py +0 -0
- {p115client-0.0.5.6.6 → p115client-0.0.5.6.7}/readme.md +0 -0
@@ -4043,7 +4043,7 @@ class P115OpenClient(ClientRequestMixin):
|
|
4043
4043
|
vip_qr_url_open = vip_qr_url
|
4044
4044
|
|
4045
4045
|
|
4046
|
-
class P115Client(
|
4046
|
+
class P115Client(P115OpenClient):
|
4047
4047
|
"""115 的客户端对象
|
4048
4048
|
|
4049
4049
|
:param cookies: 115 的 cookies,要包含 `UID`、`CID`、`KID` 和 `SEID` 等
|
@@ -4266,7 +4266,7 @@ class P115Client(ClientRequestMixin):
|
|
4266
4266
|
except OSError:
|
4267
4267
|
self.cookies_mtime = 0
|
4268
4268
|
|
4269
|
-
@overload
|
4269
|
+
@overload # type: ignore
|
4270
4270
|
@classmethod
|
4271
4271
|
def init(
|
4272
4272
|
cls,
|
@@ -16668,7 +16668,7 @@ class P115Client(ClientRequestMixin):
|
|
16668
16668
|
|
16669
16669
|
########## Recyclebin API ##########
|
16670
16670
|
|
16671
|
-
@overload
|
16671
|
+
@overload # type: ignore
|
16672
16672
|
def recyclebin_clean(
|
16673
16673
|
self,
|
16674
16674
|
payload: int | str | Iterable[int | str] | dict = {},
|
@@ -18465,7 +18465,7 @@ class P115Client(ClientRequestMixin):
|
|
18465
18465
|
api = complete_proapi("/app/uploadinfo", base_url)
|
18466
18466
|
return self.request(url=api, async_=async_, **request_kwargs)
|
18467
18467
|
|
18468
|
-
@overload
|
18468
|
+
@overload # type: ignore
|
18469
18469
|
def upload_init(
|
18470
18470
|
self,
|
18471
18471
|
/,
|
@@ -18631,7 +18631,7 @@ class P115Client(ClientRequestMixin):
|
|
18631
18631
|
payload = {"filename": filename, "target": f"U_1_{pid}"}
|
18632
18632
|
return self.request(url=api, method="POST", data=payload, async_=async_, **request_kwargs)
|
18633
18633
|
|
18634
|
-
@overload
|
18634
|
+
@overload # type: ignore
|
18635
18635
|
@staticmethod
|
18636
18636
|
def upload_gettoken(
|
18637
18637
|
request: None | Callable = None,
|
@@ -18804,7 +18804,7 @@ class P115Client(ClientRequestMixin):
|
|
18804
18804
|
request_kwargs.setdefault("parse", parse_upload_init_response)
|
18805
18805
|
return self.upload_init(async_=async_, **request_kwargs)
|
18806
18806
|
|
18807
|
-
@overload
|
18807
|
+
@overload # type: ignore
|
18808
18808
|
def upload_file_init(
|
18809
18809
|
self,
|
18810
18810
|
/,
|
@@ -19050,7 +19050,7 @@ class P115Client(ClientRequestMixin):
|
|
19050
19050
|
|
19051
19051
|
# TODO: 当文件 < 1 MB 时,文件不急着打开,需要时再打开
|
19052
19052
|
# TODO: 对于上传空文件,有特别的速度(sha1写死)
|
19053
|
-
@overload
|
19053
|
+
@overload # type: ignore
|
19054
19054
|
def upload_file(
|
19055
19055
|
self,
|
19056
19056
|
/,
|
@@ -19513,7 +19513,7 @@ class P115Client(ClientRequestMixin):
|
|
19513
19513
|
api = complete_webapi("/user/fingerprint", base_url=base_url)
|
19514
19514
|
return self.request(url=api, async_=async_, **request_kwargs)
|
19515
19515
|
|
19516
|
-
@overload
|
19516
|
+
@overload # type: ignore
|
19517
19517
|
@staticmethod
|
19518
19518
|
def user_info(
|
19519
19519
|
payload: int | str | dict,
|
@@ -20380,29 +20380,6 @@ class P115Client(ClientRequestMixin):
|
|
20380
20380
|
payload = {"ignore_warn": 0, "share_opt": 1, "safe_pwd": "", **payload}
|
20381
20381
|
return self.request(url=api, method="POST", data=payload, async_=async_, **request_kwargs)
|
20382
20382
|
|
20383
|
-
access_token = P115OpenClient.access_token
|
20384
|
-
refresh_access_token = P115OpenClient.refresh_access_token
|
20385
|
-
download_url_open = P115OpenClient.download_url_open
|
20386
|
-
download_url_info_open = P115OpenClient.download_url_info_open
|
20387
|
-
fs_copy_open = P115OpenClient.fs_copy_open
|
20388
|
-
fs_delete_open = P115OpenClient.fs_delete_open
|
20389
|
-
fs_files_open = P115OpenClient.fs_files_open
|
20390
|
-
fs_info_open = P115OpenClient.fs_info_open
|
20391
|
-
fs_mkdir_open = P115OpenClient.fs_mkdir_open
|
20392
|
-
fs_move_open = P115OpenClient.fs_move_open
|
20393
|
-
fs_search_open = P115OpenClient.fs_search_open
|
20394
|
-
fs_update_open = P115OpenClient.fs_update_open
|
20395
|
-
recyclebin_clean_open = P115OpenClient.recyclebin_clean_open
|
20396
|
-
recyclebin_list_open = P115OpenClient.recyclebin_list_open
|
20397
|
-
recyclebin_revert_open = P115OpenClient.recyclebin_revert_open
|
20398
|
-
upload_gettoken_open = P115OpenClient.upload_gettoken_open
|
20399
|
-
upload_init_open = P115OpenClient.upload_init_open
|
20400
|
-
upload_resume_open = P115OpenClient.upload_resume_open
|
20401
|
-
user_info_open = P115OpenClient.user_info_open
|
20402
|
-
upload_file_init_open = P115OpenClient.upload_file_init_open
|
20403
|
-
upload_file_open = P115OpenClient.upload_file_open
|
20404
|
-
vip_qr_url_open = P115OpenClient.vip_qr_url_open
|
20405
|
-
|
20406
20383
|
|
20407
20384
|
for name, method in P115Client.__dict__.items():
|
20408
20385
|
if not (callable(method) and method.__doc__):
|
@@ -121,7 +121,7 @@ def iter_fs_files(
|
|
121
121
|
request_kwargs.setdefault("base_url", get_webapi_origin)
|
122
122
|
fs_files = partial(client.fs_files, **request_kwargs)
|
123
123
|
elif app == "open":
|
124
|
-
fs_files = partial(client.fs_files_open, **request_kwargs)
|
124
|
+
fs_files = partial(client.fs_files_open, **request_kwargs)
|
125
125
|
else:
|
126
126
|
request_kwargs.setdefault("base_url", get_proapi_origin)
|
127
127
|
fs_files = partial(client.fs_files_app, app=app, **request_kwargs)
|
@@ -219,7 +219,7 @@ def iter_fs_files_threaded(
|
|
219
219
|
request_kwargs.setdefault("base_url", get_webapi_origin)
|
220
220
|
fs_files = partial(client.fs_files, **request_kwargs)
|
221
221
|
elif app == "open":
|
222
|
-
fs_files = partial(client.fs_files_open, **request_kwargs)
|
222
|
+
fs_files = partial(client.fs_files_open, **request_kwargs)
|
223
223
|
else:
|
224
224
|
request_kwargs.setdefault("base_url", get_proapi_origin)
|
225
225
|
fs_files = partial(client.fs_files_app, app=app, **request_kwargs)
|
@@ -336,7 +336,7 @@ async def iter_fs_files_asynchronized(
|
|
336
336
|
request_kwargs.setdefault("base_url", get_webapi_origin)
|
337
337
|
fs_files = partial(client.fs_files, **request_kwargs)
|
338
338
|
elif app == "open":
|
339
|
-
fs_files = partial(client.fs_files_open, **request_kwargs)
|
339
|
+
fs_files = partial(client.fs_files_open, **request_kwargs)
|
340
340
|
else:
|
341
341
|
request_kwargs.setdefault("base_url", get_proapi_origin)
|
342
342
|
fs_files = partial(client.fs_files_app, app=app, **request_kwargs)
|
@@ -377,7 +377,7 @@ async def iter_fs_files_asynchronized(
|
|
377
377
|
if args is None:
|
378
378
|
args = copy(payload)
|
379
379
|
ts = time()
|
380
|
-
return create_task(get_files(args))
|
380
|
+
return create_task(get_files(args))
|
381
381
|
task = make_task()
|
382
382
|
offset = payload["offset"]
|
383
383
|
while True:
|
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
|