2023.10.1 Update
This content may be outdated—please cross-check with the official repo.
Heads-up:
As of 2023.10.1, new users can pull the Debian image
docker pull whyour/qinglong:debian.It’s more compatible with some Python deps: e.g., ddddocr installs on the Debian tag but not on the default image.
Preface
After sharing the Qinglong setup and JD beans task, I found another fun project: BiliTools.
Based on the original docs, here’s my configuration tutorial plus personal notes. Take what you need.
Note:
vercel.app was recently blocked in China; you’ll need a proxy to read the original docs.
Prerequisites
A running Qinglong server (local or cloud).
Setup guide: click here.
The project supports many environments (local, Qinglong, Docker, serverless, etc.). This post only covers Qinglong.
Tutorial
Install dependency
In Qinglong Panel -> Dependency Management -> NodeJs -> New dependency, enter @catlair/bilitools and install.
Pull the script
In Qinglong Panel -> Cron Jobs -> New job, set Name (anything), Command (ql raw https://gitee.com/Kudouran/BiliTools/raw/main/tools/bilitools_npm.js), Schedule (0 0 0 * * *), then create and run once manually.
About the cron rule:
This uses a Java-style cron expression.
0 0 0 * * *means once daily at midnight. Adjust with an online tool if needed.
Update npm package
Auto-update looks like this:
| |
Without
pnpm remove -g @catlair/bilitools, old versions linger on disk.
Get cookies
Desktop browser incognito (recommended)
Example with Firefox/Chrome/Edge. Final cookie resembles (line breaks added for readability):
| |
To avoid cookie refresh/invalidations (e.g., if you frequently browse Bilibili, the session might rotate), don’t copy cookies from your everyday session. Instead, open a private/incognito window, log in, and capture a fresh cookie. Close the window directly—don’t log out or the cookie dies immediately.
Incognito shortcuts (examples):
Chrome
Open an incognito window, visit Bilibili, log in. Press F12 (or right-click -> Inspect), switch to Network, refresh, click a request (often the first nav request), then copy the cookie.
When copying in Chromium browsers, choose Copy (not “Copy value”).
Firefox
Open a private window, visit Bilibili, log in. Press F12 (or right-click -> Inspect), go to Network, refresh.
Mobile
Not recommended—too many pitfalls.
Config file (important)
Configuration is the core of the project. Only a correct config will run properly—read carefully.
Lazy single-user template (edit as needed)
| |
If you use the template, edit these four places:
User-Agent required — copy the red text from this site.
Cookie required — see above.
Coin settings — adjust as needed (e.g., disable once you reach Lv6).
1 2 3 4 5 6 7 8coin: { targetLevel: 6, stayCoins: 0, targetCoins: 5, customizeUp: [], todayCoins: 0, upperAccMatch: false, }Notification — recommended to fill.
1 2 3 4 5message: { br: '\n', 'QYWX_KEY': "Fill your key here", // Other providers are also supported (GOBOT, SCKEY, QQ, etc.) }
Add environment variable
Config uses
json5(supports comments). Validate with an online json5 validator before use.Paste the validated config into the Gzip tool, choose Gzip compress, then copy the output.
In Qinglong Panel -> Environment variables -> New variable, set Name BILITOOLS_CONFIG, Value = the Gzip output, then save.
Run manually
Back on the Qinglong tasks page you should see three BiliBili jobs:
Names can be anything—watch the commands:
- First: update dependency
- Third: pull repo
- Second: main program (visible after running the pull once)
When ready, run the main job manually.










