About this project
bili-subtitle is a single-file userscript used to automatically extract CC and AI subtitles on Bilibili video pages. It employs a multi-strategy fallback mechanism: prioritizing the WBI signed API, switching to the new Protobuf interface upon failure, and finally capturing resources already loaded by the player. All subtitle tracks are bound to the video context (bvid:cid) and sorted by credibility to ensure only correctly attributed subtitles are displayed. The script does not read Cookies, download audio/video, or call ASR, and performs no data uploads or analysis. It supports copying plain text, text with timestamps, and exporting to TXT, SRT, and JSON. Installation is simple, requiring only Tampermonkey or Violentmonkey; extraction is triggered by clicking the "Subtitles" button. The panel provides detailed diagnostic information, including the execution status of each strategy and the final winner. The design goals are zero configuration, high resilience, and small size, specifically created to handle Bilibili's frequent interface changes. The project has passed 72 unit tests, verifying the WBI signing algorithm, cross-video subtitle error prevention mechanisms, and real-browser extraction capabilities. It does not support anime pages, mobile versions, or the international site. The troubleshooting guide covers common issues such as 403/404 errors, empty tracks, and non-logged-in states. Development dependencies are minimal, with a clear structure separating build and test processes. Technical inspiration is credited to several open-source projects, though the code is independently implemented. This is a non-official project that only processes subtitle content accessible to the current user.
Comments
0 Rating appears after 10 ratings
Sign in to join the discussion.