SuperAPI AI Directory

bilibili-subtitle-downloader

Agents & models

View repository

Updated 10-15 20:34

About this skill

Bilibili Subtitle Downloader Skill

This skill automates the process of extracting and summarizing Bilibili video subtitles by using dedicated Python scripts and sub-agent orchestration.

Workflow

  1. Extract subtitles: Run the built-in script to download and chunk the subtitles. Regular videos all start with a BV number

    python3 skills/bilibili-subtitle-downloader/scripts/download_and_chunk.py <BV_ID>
    
    • Login check: If the script outputs QR_CODE_READY:<PATH>, it will wait for the user to scan the QR code. You should send this image to the user.
    • Save Cookie: After a successful login, the script will automatically save the Cookie to ~/.openclaw/workspace/bilibili_cookie.txt。
  2. Process output: Parse the script output RESULT_JSONto obtain the list of chunk files. Chunk file naming format:

    • Regular video (BV number): bili_temp/<BV_ID>/<BV_ID>_chunk_0.txt
    • Course episode (EP number): bili_temp/<EP_ID>/chunk_0.txt

Bilibili Course (Cheese) Workflow

  1. Extract course/episode information: Use the course-specific script to obtain metadata and subtitles. Courses or videos often start with SS or EP
    python3 skills/bilibili-subtitle-downloader/scripts/cheese_downloader.py <SS_ID or EP_ID>
    
    • Login: The script will generate a bilibili_login_qr.png. Scan it to log in.
    • SS_ID mode: If an SS_ID is provided (such as ss123), the script will print the course information and the list of all episodes; a specific EP_ID is required to obtain subtitles.
    • EP_ID mode: If an EP_ID is provided (such as ep456), the script will download the subtitles and split and save them to the bili_temp/ep456/ directory, outputting RESULT_JSON。

Sub-agent instructions

When generating a sub-agent for summarization, use the following prompt pattern:

Please read the following Bilibili video subtitle chunks and provide a comprehensive, accurate summary.

Requirements:

  • Capture all key technical details, specific data points, and logical steps.
  • Use headings to maintain a clear structure.
  • Clearly state the main points and actionable takeaways.
  • Style: professional, informative, and detailed.

Subtitle files: [PATH_TO_CHUNK]

Resources

  • Script: scripts/download_and_chunk.py - Handles Bilibili API interactions and Token-based secure chunking.