Preface¶
When conducting research or content analysis within DeepSeek Harness (DSH), you often need the number of followers of an Uploader, the list of uploads, and the playback and interaction data for a single video. If you let the agent scrape webpages or stitch APIs itself, you often have to deal with Wbi signatures, Cookies, and risk control error codes, and the results are hard to structure. dsh-plugin-bilibili encapsulates four types of Bilibili public data queries into tools callable by DSH: the Node side registers the tool and spawns a subprocess, the Python side sends HTTP uniformly and returns JSON, and the agent only needs to call it according to parameters.
What is this¶
dsh-plugin-bilibili is a DSH bundle released by maintainer KKhxr, categorized as “Internet Tools” in the community directory. It exposes four tools corresponding to Bilibili’s public web interfaces in a DSH 0.2.x environment; it does not read private data requiring login, such as DMs, collections, and watch history. The repository is under the MIT license, and the current package version is 1.0.0.
Architecturally, the agent calls the host’s index.mjs via DSH; the host passes JSON parameters via stdin and starts Python 3.10 layer scripts/bili.py; Python uses curl_cffi to access Bilibili APIs with Wbi signatures, and outputs a line of JSON via stdout as the tool result.
Core Features¶
The following capabilities come from the project README and documentation, querying only public data.
| Tool | Function | Main Return Fields |
|---|---|---|
bili_user_stat |
Account overview | Nickname, follower count, following count, archive count |
bili_user_videos |
Uploader upload list (paginated) | bvid, title, duration, publish time, play, comment, danmaku |
bili_video_info |
Single video details | play, like, coin, favorite, share, danmaku, comment, duration, uploader |
bili_search_user |
Search users by keyword | mid, nickname, signature, follower count, archive count, level, live room |
The Python layer agrees to return {"code": 0, "data": ...} or a non-zero code with a message; the host converts non-zero codes into readable tool errors. Common codes include: -101 (Cookie missing valid SESSDATA), -352 (Wbi or Cookie rejected), 412 (TLS/Referer risk control), -799 (Rate limited, suggest waiting about 10 seconds before retrying), -404 (uid/bvid does not exist).
Environment and Dependencies¶
Before installation and running, the conditions listed in the README must be met:
- DSH 0.2.x (dev and verification versions include
0.2.1-rc.5) - Node.js >= 20 (bundled runtime examples in docs are 24.x)
- Python 3.10.11 (syntax is only compatible with 3.10)
- Python packages:
curl_cffi,python-dotenv
Install Python dependencies in the plugin directory:
python -m pip install -r scripts/requirements.txt
If python is not in the system PATH, you can set the environment variable BILI_PYTHON to point to the interpreter path.
Installation and Enablement¶
1. Configure Cookie¶
Copy the example in the plugin root directory and edit .env:
cp .env.example .env
BILI_COOKIE="SESSDATA=YOUR_SESSDATA; bili_jct=YOUR_BILI_JCT; buvid3=YOUR_BUVID3"
.env must be placed in the plugin root directory; Python parses it based on the script path, not depending on the current working directory. Environment variables take precedence over .env. When querying only public data, anonymous Cookies (buvid3 and b_nut) are usually sufficient; when fetching the upload list, SESSDATA with an account is more stable.
2. Load DSH Profile¶
Call plugin_manager via the agent:
{
"action": "install_bundle",
"target": "/absolute/path/to/dsh-plugin-bilibili"
}
Or use the CLI (path must be absolute):
dsh plugin --profile <profile> add /absolute/path/to/dsh-plugin-bilibili
Then add dsh-plugin-bilibili to dsh.profile.bundles in the corresponding profile’s package.json and restart DSH.
When not officially installed, you can use cordis.yml in the repository for temporary verification:
dsh --profile headless --patch ./cordis.yml "call bili_user_stat for uid 2"
In some Windows environments, pnpm may have issues with
link:paths containing non-ASCII characters; if the installation path is garbled, move the plugin to a pure ASCII directory first.
Typical Usage¶
In the Web GUI, you can use natural language to let the agent call them; README examples include:
Call bili_user_stat for uid 2.
Call bili_video_info for bvid BV1GJ411x7h7.
Call bili_user_videos for uid 2, page 1, order pubdate.
Call bili_search_user with keyword "老番茄".
When bili_user_stat succeeds, it returns a structure similar to:
{
"uid": 2,
"mid": 2,
"name": "碧诗",
"follower": 1437776,
"following": 430,
"archive_count": 44
}
See the repository’s docs/usage.md for tool parameters, return fields, and task templates.
Suitable Scenarios and Considerations¶
Suitable for: Application developers who need to query Bilibili public account and video statistics in DSH conversations or automation workflows, for personal study or low-frequency data verification.
Execution Mode: The plugin runs with the permissions of the current DSH process; Cookies are written in the local .env. Before installation, you should read the source code and MIT license, and be aware of the project’s statement that there is no official affiliation with Bilibili or DeepSeek / SuiHua, it must not be used for bulk scraping or commercial purposes, and you must comply with Bilibili’s Terms of Service and maintain a low request frequency (the implementation side has a global request interval of about 2 seconds, and the host serializes tool calls).
Compatibility: The README states that it has been fully verified on Windows 10/11 + Python 3.10.11 + DSH 0.2.1-rc.5; macOS/Linux is theoretically usable but not end-to-end verified. Bilibili interfaces and risk control may change, so you need to pay attention to error codes and Cookie refresh yourself.
The community plugin directory is an independent site with no official affiliation with DeepSeek / SuiHua; installation paths in this article use local absolute paths, do not fabricate commands like dsh plugin add github:... based on the repository name, as they do not appear in the documentation.
Conclusion¶
dsh-plugin-bilibili fixes four types of Bilibili public data queries as DSH tools, reducing the cost of the agent side connecting to signatures and Cookies. For more details, see the repository README, installation docs, and architecture description.
- Community Directory Page: https://www.skillhub.cn/plugins/KKhxr/dsh-plugin-bilibili
- GitHub: https://github.com/KKhxr/dsh-plugin-bilibili