p115client 0.0.5.14.3__tar.gz → 0.0.5.14.4__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.14.3 → p115client-0.0.5.14.4}/PKG-INFO +2 -2
- {p115client-0.0.5.14.3 → p115client-0.0.5.14.4}/p115client/client.py +8 -4
- {p115client-0.0.5.14.3 → p115client-0.0.5.14.4}/p115client/tool/iterdir.py +4 -4
- {p115client-0.0.5.14.3 → p115client-0.0.5.14.4}/pyproject.toml +2 -2
- {p115client-0.0.5.14.3 → p115client-0.0.5.14.4}/LICENSE +0 -0
- {p115client-0.0.5.14.3 → p115client-0.0.5.14.4}/p115client/__init__.py +0 -0
- {p115client-0.0.5.14.3 → p115client-0.0.5.14.4}/p115client/_upload.py +0 -0
- {p115client-0.0.5.14.3 → p115client-0.0.5.14.4}/p115client/const.py +0 -0
- {p115client-0.0.5.14.3 → p115client-0.0.5.14.4}/p115client/exception.py +0 -0
- {p115client-0.0.5.14.3 → p115client-0.0.5.14.4}/p115client/py.typed +0 -0
- {p115client-0.0.5.14.3 → p115client-0.0.5.14.4}/p115client/tool/__init__.py +0 -0
- {p115client-0.0.5.14.3 → p115client-0.0.5.14.4}/p115client/tool/attr.py +0 -0
- {p115client-0.0.5.14.3 → p115client-0.0.5.14.4}/p115client/tool/auth.py +0 -0
- {p115client-0.0.5.14.3 → p115client-0.0.5.14.4}/p115client/tool/download.py +0 -0
- {p115client-0.0.5.14.3 → p115client-0.0.5.14.4}/p115client/tool/edit.py +0 -0
- {p115client-0.0.5.14.3 → p115client-0.0.5.14.4}/p115client/tool/export_dir.py +0 -0
- {p115client-0.0.5.14.3 → p115client-0.0.5.14.4}/p115client/tool/fs_files.py +0 -0
- {p115client-0.0.5.14.3 → p115client-0.0.5.14.4}/p115client/tool/history.py +0 -0
- {p115client-0.0.5.14.3 → p115client-0.0.5.14.4}/p115client/tool/life.py +0 -0
- {p115client-0.0.5.14.3 → p115client-0.0.5.14.4}/p115client/tool/offline.py +0 -0
- {p115client-0.0.5.14.3 → p115client-0.0.5.14.4}/p115client/tool/pool.py +0 -0
- {p115client-0.0.5.14.3 → p115client-0.0.5.14.4}/p115client/tool/request.py +0 -0
- {p115client-0.0.5.14.3 → p115client-0.0.5.14.4}/p115client/tool/upload.py +0 -0
- {p115client-0.0.5.14.3 → p115client-0.0.5.14.4}/p115client/tool/util.py +0 -0
- {p115client-0.0.5.14.3 → p115client-0.0.5.14.4}/p115client/tool/xys.py +0 -0
- {p115client-0.0.5.14.3 → p115client-0.0.5.14.4}/p115client/type.py +0 -0
- {p115client-0.0.5.14.3 → p115client-0.0.5.14.4}/readme.md +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: p115client
|
3
|
-
Version: 0.0.5.14.
|
3
|
+
Version: 0.0.5.14.4
|
4
4
|
Summary: Python 115 webdisk client.
|
5
5
|
Home-page: https://github.com/ChenyangGao/p115client
|
6
6
|
License: MIT
|
@@ -29,7 +29,7 @@ Requires-Dist: iter_collect (>=0.0.5.1)
|
|
29
29
|
Requires-Dist: multidict
|
30
30
|
Requires-Dist: orjson
|
31
31
|
Requires-Dist: p115cipher (>=0.0.3)
|
32
|
-
Requires-Dist: p115pickcode (>=0.0.
|
32
|
+
Requires-Dist: p115pickcode (>=0.0.5)
|
33
33
|
Requires-Dist: posixpatht (>=0.0.3)
|
34
34
|
Requires-Dist: python-argtools (>=0.0.1)
|
35
35
|
Requires-Dist: python-asynctools (>=0.1.3)
|
@@ -693,7 +693,8 @@ def normalize_attr_web[D: dict[str, Any]](
|
|
693
693
|
if "te" in info:
|
694
694
|
attr["mtime"] = int(info["te"])
|
695
695
|
else:
|
696
|
-
|
696
|
+
if "pickcode" in attr:
|
697
|
+
attr["pick_code"] = attr["pickcode"]
|
697
698
|
attr["ico"] = info.get("ico", "folder" if is_dir else "")
|
698
699
|
if "te" in info:
|
699
700
|
attr["mtime"] = attr["user_utime"] = int(info["te"])
|
@@ -837,7 +838,8 @@ def normalize_attr_app[D: dict[str, Any]](
|
|
837
838
|
if "upt" in info:
|
838
839
|
attr["mtime"] = int(info["upt"])
|
839
840
|
else:
|
840
|
-
|
841
|
+
if "pickcode" in attr:
|
842
|
+
attr["pick_code"] = attr["pickcode"]
|
841
843
|
attr["ico"] = info.get("ico", "folder" if attr["is_dir"] else "")
|
842
844
|
if "thumb" in info:
|
843
845
|
thumb = info["thumb"]
|
@@ -980,7 +982,8 @@ def normalize_attr_app2[D: dict[str, Any]](
|
|
980
982
|
if "user_ptime" in info:
|
981
983
|
attr["mtime"] = int(info["user_ptime"])
|
982
984
|
else:
|
983
|
-
|
985
|
+
if "pickcode" in attr:
|
986
|
+
attr["pick_code"] = attr["pickcode"]
|
984
987
|
if is_dir:
|
985
988
|
if "thumb_url" in info:
|
986
989
|
attr["thumb"] = info["thumb_url"]
|
@@ -1620,7 +1623,7 @@ class ClientRequestMixin:
|
|
1620
1623
|
api = complete_api("/open/authorize", base_url=base_url)
|
1621
1624
|
payload = {"response_type": "code", **payload}
|
1622
1625
|
def parse(resp, content, /):
|
1623
|
-
if resp
|
1626
|
+
if get_status_code(resp) == 302:
|
1624
1627
|
return {
|
1625
1628
|
"state": True,
|
1626
1629
|
"url": resp.headers["location"],
|
@@ -2290,6 +2293,7 @@ class ClientRequestMixin:
|
|
2290
2293
|
|
2291
2294
|
:param app: 扫二维码后绑定的 `app` (或者叫 `device`)
|
2292
2295
|
:param console_qrcode: 在命令行输出二维码,否则在浏览器中打开
|
2296
|
+
:param base_url: 接口的基地址
|
2293
2297
|
:param async_: 是否异步
|
2294
2298
|
:param request_kwargs: 其它请求参数
|
2295
2299
|
|
@@ -2799,7 +2799,7 @@ def traverse_tree(
|
|
2799
2799
|
async_: Literal[False, True] = False,
|
2800
2800
|
**request_kwargs,
|
2801
2801
|
) -> Iterator[dict] | AsyncIterator[dict]:
|
2802
|
-
"""
|
2802
|
+
"""遍历目录树,获取文件或目录节点的信息
|
2803
2803
|
|
2804
2804
|
:param client: 115 客户端或 cookies
|
2805
2805
|
:param cid: 目录 id 或 pickcode
|
@@ -2809,7 +2809,7 @@ def traverse_tree(
|
|
2809
2809
|
:param async_: 是否异步
|
2810
2810
|
:param request_kwargs: 其它请求参数
|
2811
2811
|
|
2812
|
-
:return:
|
2812
|
+
:return: 迭代器,返回此目录内的文件或目录节点的信息
|
2813
2813
|
"""
|
2814
2814
|
if isinstance(client, str):
|
2815
2815
|
client = P115Client(client, check_for_relogin=True)
|
@@ -2896,7 +2896,7 @@ def traverse_tree_with_path(
|
|
2896
2896
|
async_: Literal[False, True] = False,
|
2897
2897
|
**request_kwargs,
|
2898
2898
|
) -> Iterator[dict] | AsyncIterator[dict]:
|
2899
|
-
"""
|
2899
|
+
"""遍历目录树,获取文件或目录节点的信息(包含 "path",可选 "ancestors")
|
2900
2900
|
|
2901
2901
|
:param client: 115 客户端或 cookies
|
2902
2902
|
:param cid: 目录 id 或 pickcode
|
@@ -2914,7 +2914,7 @@ def traverse_tree_with_path(
|
|
2914
2914
|
:param async_: 是否异步
|
2915
2915
|
:param request_kwargs: 其它请求参数
|
2916
2916
|
|
2917
|
-
:return:
|
2917
|
+
:return: 迭代器,返回此目录内的文件或目录节点的信息
|
2918
2918
|
"""
|
2919
2919
|
if isinstance(client, str):
|
2920
2920
|
client = P115Client(client, check_for_relogin=True)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
[tool.poetry]
|
2
2
|
name = "p115client"
|
3
|
-
version = "0.0.5.14.
|
3
|
+
version = "0.0.5.14.4"
|
4
4
|
description = "Python 115 webdisk client."
|
5
5
|
authors = ["ChenyangGao <wosiwujm@gmail.com>"]
|
6
6
|
license = "MIT"
|
@@ -37,7 +37,7 @@ iter_collect = ">=0.0.5.1"
|
|
37
37
|
multidict = "*"
|
38
38
|
orjson = "*"
|
39
39
|
p115cipher = ">=0.0.3"
|
40
|
-
p115pickcode = ">=0.0.
|
40
|
+
p115pickcode = ">=0.0.5"
|
41
41
|
posixpatht = ">=0.0.3"
|
42
42
|
python-argtools = ">=0.0.1"
|
43
43
|
python-asynctools = ">=0.1.3"
|
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
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|