name: p115 description: "Operate 115网盘 (115.com) via p115client: QR-code login, list folders/files (ls), and download files to local disk. Use when user asks to scan QR login to 115, view root directory contents, browse by cid, or download from 115网盘."
p115(115网盘)
This skill provides three core actions (as requested):
- 扫码登录 → write cookies to
~/115-cookies.txt - 列目录(root 或指定 cid)
- 下载文件(按关键字匹配或 pick_code)
Setup (one-time)
Create venv + install deps:
python3 -m venv /Users/keynes/.openclaw/workspace/venv115
source /Users/keynes/.openclaw/workspace/venv115/bin/activate
python -m pip install -U pip setuptools wheel
python -m pip install -U p115client pillow
1) QR login (required)
Run and then scan the QR from your phone:
source /Users/keynes/.openclaw/workspace/venv115/bin/activate
python /Users/keynes/.openclaw/workspace/skills/p115/scripts/p115_qr_login.py
- It prints
QR_PNG=/tmp/115-login-qr.png(send/preview this image for user). - On success: writes cookies to
~/115-cookies.txt. - Cookies are secrets; never echo full cookies back to chat.
2) List folder (ls)
Root:
source /Users/keynes/.openclaw/workspace/venv115/bin/activate
python /Users/keynes/.openclaw/workspace/skills/p115/scripts/p115_ls.py --cid 0 --limit 50
List a specific folder by cid:
python /Users/keynes/.openclaw/workspace/skills/p115/scripts/p115_ls.py --cid <CID> --limit 50
3) Download
A) Download by keyword (fast demo)
source /Users/keynes/.openclaw/workspace/venv115/bin/activate
python /Users/keynes/.openclaw/workspace/skills/p115/scripts/p115_download.py --cid <CID> --match "keyword" --out ~/Downloads/
Use --dry-run first to confirm which file will be downloaded.
B) Get direct URL by pick_code
python /Users/keynes/.openclaw/workspace/skills/p115/scripts/p115_download.py --pick-code <PICK_CODE> --dry-run
Notes
- p115client’s
fs_filesreturns list items underresp['data'](notdata.list). - 115 API fields commonly used:
n(name),cid(folder id),fid(file id),pc(pick_code),s(size).