p115client 0.0.5.5.5__tar.gz → 0.0.5.6.1__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.5.5 → p115client-0.0.5.6.1}/PKG-INFO +35 -2
- {p115client-0.0.5.5.5 → p115client-0.0.5.6.1}/p115client/_upload.py +1 -1
- {p115client-0.0.5.5.5 → p115client-0.0.5.6.1}/p115client/client.py +10682 -8495
- {p115client-0.0.5.5.5 → p115client-0.0.5.6.1}/p115client/tool/fs_files.py +24 -15
- {p115client-0.0.5.5.5 → p115client-0.0.5.6.1}/pyproject.toml +2 -2
- {p115client-0.0.5.5.5 → p115client-0.0.5.6.1}/readme.md +33 -0
- {p115client-0.0.5.5.5 → p115client-0.0.5.6.1}/LICENSE +0 -0
- {p115client-0.0.5.5.5 → p115client-0.0.5.6.1}/p115client/__init__.py +0 -0
- {p115client-0.0.5.5.5 → p115client-0.0.5.6.1}/p115client/const.py +0 -0
- {p115client-0.0.5.5.5 → p115client-0.0.5.6.1}/p115client/exception.py +0 -0
- {p115client-0.0.5.5.5 → p115client-0.0.5.6.1}/p115client/py.typed +0 -0
- {p115client-0.0.5.5.5 → p115client-0.0.5.6.1}/p115client/tool/__init__.py +0 -0
- {p115client-0.0.5.5.5 → p115client-0.0.5.6.1}/p115client/tool/download.py +0 -0
- {p115client-0.0.5.5.5 → p115client-0.0.5.6.1}/p115client/tool/edit.py +0 -0
- {p115client-0.0.5.5.5 → p115client-0.0.5.6.1}/p115client/tool/export_dir.py +0 -0
- {p115client-0.0.5.5.5 → p115client-0.0.5.6.1}/p115client/tool/iterdir.py +0 -0
- {p115client-0.0.5.5.5 → p115client-0.0.5.6.1}/p115client/tool/life.py +0 -0
- {p115client-0.0.5.5.5 → p115client-0.0.5.6.1}/p115client/tool/pool.py +0 -0
- {p115client-0.0.5.5.5 → p115client-0.0.5.6.1}/p115client/tool/request.py +0 -0
- {p115client-0.0.5.5.5 → p115client-0.0.5.6.1}/p115client/tool/upload.py +0 -0
- {p115client-0.0.5.5.5 → p115client-0.0.5.6.1}/p115client/tool/xys.py +0 -0
- {p115client-0.0.5.5.5 → p115client-0.0.5.6.1}/p115client/type.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: p115client
|
3
|
-
Version: 0.0.5.
|
3
|
+
Version: 0.0.5.6.1
|
4
4
|
Summary: Python 115 webdisk client.
|
5
5
|
Home-page: https://github.com/ChenyangGao/p115client
|
6
6
|
License: MIT
|
@@ -40,7 +40,7 @@ Requires-Dist: python-filewrap (>=0.2.6.1)
|
|
40
40
|
Requires-Dist: python-hashtools (>=0.0.3.3)
|
41
41
|
Requires-Dist: python-http_request (>=0.0.6)
|
42
42
|
Requires-Dist: python-httpfile (>=0.0.5)
|
43
|
-
Requires-Dist: python-iterutils (>=0.1.
|
43
|
+
Requires-Dist: python-iterutils (>=0.1.8)
|
44
44
|
Requires-Dist: python-property (>=0.0.3)
|
45
45
|
Requires-Dist: python-startfile (>=0.0.2)
|
46
46
|
Requires-Dist: python-undefined (>=0.0.3)
|
@@ -106,6 +106,39 @@ from pathlib import Path
|
|
106
106
|
client = P115Client(Path("~/115-cookies.txt").expanduser(), check_for_relogin=True)
|
107
107
|
```
|
108
108
|
|
109
|
+
如果你有一个申请通过的开放接口的应用,则可以创建开放接口的客户端实例
|
110
|
+
|
111
|
+
你可以直接从一个 `P115Client` 实例拿到授权(自动扫码登录并授权)
|
112
|
+
|
113
|
+
```python
|
114
|
+
app_id = <开放接口应用的 AppID>
|
115
|
+
client_open = client.login_another_open(app_id)
|
116
|
+
```
|
117
|
+
|
118
|
+
也可以用一个已经授权得到的 `refresh_token` (一次性使用)
|
119
|
+
|
120
|
+
```python
|
121
|
+
from p115client import P115OpenClient
|
122
|
+
|
123
|
+
client_open = P115OpenClient(refresh_token)
|
124
|
+
```
|
125
|
+
|
126
|
+
或者手动扫码登录
|
127
|
+
|
128
|
+
```python
|
129
|
+
client_open = P115OpenClient(app_id)
|
130
|
+
```
|
131
|
+
|
132
|
+
所以综上,推荐的初始化代码为
|
133
|
+
|
134
|
+
```python
|
135
|
+
from p115client import P115Client, P115OpenClient
|
136
|
+
from pathlib import Path
|
137
|
+
|
138
|
+
client = P115Client(Path("~/115-cookies.txt").expanduser(), check_for_relogin=True)
|
139
|
+
client_open = client.login_another_open(app_id)
|
140
|
+
```
|
141
|
+
|
109
142
|
### 2. 接口调用
|
110
143
|
|
111
144
|
所有需要直接或间接执行 HTTP 请求的接口,都有同步和异步的调用方式
|