You can run as CLI to scrape danmaku locally and save as xml file. Or run as a web server to provide DanDanPlay API and enjoy with your compatible player.
Matching may not so precisely and waiting for optimization. But basically usable.
My goal is Building a lightweight and stateless(real-time) danmaku server.
The following 4 platforms are not fully tested. No special season matching support by now.
Get a better match with Emby API enabled.
- complete danmaku scrape CLI
- scrape by BV id of Bilibili
- save as ASS file
- scrape by album of iqiyi
- scrape by show of youku
- bilibili scrape and DanDan API match
- iqiyi scrape and DanDan API match
- youku scrape and DanDan API match
- tencent scrape and DanDan API match
- other platforms...
-
/match -
/comment/{id} -
/search/anime -
/bangumi/{id}
Priority is low.
Run as CLI:
git clone https://github.com/lostars/danmaku-tool.git
cd danmaku-tool
make build
Run as docker:
docker pull ghcr.io/lostars/danmaku-tool:latest
default config file in ~/.config/danmaku-tool/config.yaml or
same location as the executable file.
You can check the full config here.
danmaku -h for details.
You can run danmaku completion to generate autocompletion for your shell before start.
scrape danmaku:
danmaku scrape <id> --platform=bilibili
id
-
bilibili support epid(ep269616) or ssid(ss28564) from url:
https://www.bilibili.com/bangumi/play/ss28564 or https://www.bilibili.com/bangumi/play/ep269616
danmaku d ss28564 --platform=bilibiliNotice that using ssid will scrape all EP's danmaku and download.
And using epid only download the corresponding danmaku.
-
tencent video support cid/vid from url:
https://v.qq.com/x/cover/znda81ms78okdwd/e00242bvw06.html
znda81ms78okdwdis cid,e00242bvw06is viddanmaku d znda81ms78okdwd/e00242bvw06 --platform=tencent -
youku video url looks like: https://v.youku.com/v_show/id_XMTA3MDAzODEy.html?s=cc07361a962411de83b1 id_xxxx xxxx is vid. s=xxxx xxxx is showId
-
iqiyi video url looks like: https://www.iqiyi.com/v_19rrk2gwkw.html v_xxx xxx is tvId; https://www.iqiyi.com/a_19rrk2hct9.html a_xxx xxx is albumId
danmaku server -c /path/to/your/config.yaml -p [port] to start a web server.
Or u can start as a docker from above.
docker run -p 8089:8089 --name danmaku \
-v /path/to/your/config.yaml:/app/config.yaml \
ghcr.io/lostars/danmaku-tool:latest
-
/match -
/comment/{id} -
/search/anime -
/bangumi/{id}
API above is enough to most scenarios currently.