forked from Quan666/PikPakAPI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.py
79 lines (67 loc) · 1.82 KB
/
test.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
import json
from pikpakapi import PikPakApi
import asyncio
async def test():
client = PikPakApi(
username="your_username",
password="your_password",
proxy="127.0.0.1:7890",
)
await client.login()
print(json.dumps(client.get_user_info(), indent=4))
print("=" * 30, end="\n\n")
print(
json.dumps(
await client.offline_download(
"magnet:?xt=urn:btih:42b46b971332e776e8b290ed34632d5c81a1c47c"
),
indent=4,
)
)
print("=" * 30, end="\n\n")
print(json.dumps(await client.offline_list(), indent=4))
print("=" * 30, end="\n\n")
print(
json.dumps(
await client.offline_file_info("VN5omQUMRn5NlHL8lMt91q5Io1"), indent=4
)
)
print("=" * 30, end="\n\n")
print(
json.dumps(
await client.file_rename("VNayNjZtsdmka4YrwZWVj-r4o1", '[Nekomoe kissaten][Deaimon][11][1080p][CHS]_01.mp4'), indent=4
)
)
print("=" * 30, end="\n\n")
print(
json.dumps(
await client.file_batch_star(ids=['VN6qSS-FBcaI6l7YltWsjUU1o1']), indent=4
)
)
print("=" * 30, end="\n\n")
print(
json.dumps(
await client.file_batch_unstar(ids=['VN6qSS-FBcaI6l7YltWsjUU1o1']), indent=4
)
)
print("=" * 30, end="\n\n")
print(
json.dumps(
await client.file_star_list(), indent=4
)
)
print("=" * 30, end="\n\n")
print(
json.dumps(
await client.file_batch_share(ids=['VN6qSS-FBcaI6l7YltWsjUU1o1'], need_password=True)
)
)
print("=" * 30, end="\n\n")
print(
json.dumps(
await client.get_quota_info(), indent=4
)
)
print("=" * 30, end="\n\n")
if __name__ == "__main__":
asyncio.run(test())