Background#
I have previously written an article about finding the history of removed videos on Bilibili, which includes two ways to obtain historical bullet comments.
However, both of these methods essentially rely on users uploading and saving the comments themselves, so if it's a less popular anime, you may find that there are no comments available.
The most comprehensive bullet comment database is still Bilibili's own database, so this time we will directly download the bullet comment files from Bilibili's database using the anime title.
Historical Bullet Comments#
Obtaining the CID Number#
This platform used to support direct downloading of bullet comments, but it is no longer supported. However, we can still download them ourselves. After opening the website,
1. Click on 展开更多选项
(Expand more options)
数据源
(Data source) -> biliplus站内搜索
(biliplus site search)
Next, you can start searching by keyword. You can use conditions to narrow down the scope, for example, entering ' 秋叶原之旅 @连载动画 ' (Akihabara Travel @Ongoing Anime) will only include videos in the ongoing anime section.
Note that some early or unofficial submissions may not be indexed in the corresponding section, so you should not restrict the section when searching.
Below are some commonly used section names, for more details, please refer to the documentation
- Ongoing Anime
- Completed Anime
- Japanese Movies
- Chinese TV Series
- Overseas TV Series
In addition, if you enter 秋叶原之旅 @m=928123
, it will only include videos uploaded by Bilibili's official anime account.
928123 is the mid number for Bilibili's official anime account, which can be found in the link to their personal space.
The table below shows the mid numbers for some official accounts.
Official Account | mid |
---|---|
Bilibili Anime | 928123 |
Bilibili Anime Business Trip | 11783021 |
Bilibili Movies | 15773384 |
Miying Society | 4856007 |
2. After the search, you can get the AV number you want.
3. In fact, if you have the AV number, you can convert it to CID using existing APIs, but biliplus also provides this function.
If you are interested, you can check out the API documentation collected by the experts.
Click to open
-> 视频cid历史
(Video CID history)
Downloading and Converting Bullet Comments#
Method 1
An online tool provided by experts for merging bullet comments based on AV number or CID.
Method 2
- Note: The following APIs may become invalid due to updates on Bilibili. You can replace them with the API documentation.
Paste the CID number at the end of this link and visit to download. segment_index=1 represents bullet comments for the first 0-6 minutes, and you need to increment it based on the video duration to get the complete bullet comments.
https://api.bilibili.com/x/v2/dm/web/seg.so?type=1&segment_index=1&oid=
After downloading, you will see a seg.so file. You can directly use an online converter or write your own parsing code to convert it. If you're interested, you can check out this documentation
Convert seg.so to ass format
Convert ass format to xml format
Now we have our bullet comment file ready for use.