Paimon

Paimon

👀谢谢关注喵

Bilibili Removes Video Search and Danmaku Retrieval

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#

biliplus

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)

QQ 图片 20230430193600.png

数据源 (Data source) -> biliplus站内搜索 (biliplus site search)

QQ 图片 20230430193225.png

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 Accountmid
Bilibili Anime928123
Bilibili Anime Business Trip11783021
Bilibili Movies15773384
Miying Society4856007

2. After the search, you can get the AV number you want.

QQ 图片 20230430194751.png

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)

QQ 截图 20230430200620.jpg
QQ 图片 20230430200647.png

Downloading and Converting Bullet Comments#

Method 1

bilitool

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

ass-danmaku-online

Convert ass format to xml format

danmubox

Now we have our bullet comment file ready for use.

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.