https://github.com/controlnet/bili-parser
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (8.9%) to scientific vocabulary
Repository
Basic Info
- Host: GitHub
- Owner: ControlNet
- Language: TypeScript
- Default Branch: master
- Homepage: https://bili-parser.vercel.app
- Size: 50.8 KB
Statistics
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
Bilibili Video Info Parser
This is a web application designed to parse Bilibili video links, display detailed video information, and provide a formatted text output for easy copying. It also includes automatic subtitle generation using AI-powered speech recognition.
It works on both web frontend and api endpoints.
Setup
Environment Variables
Copy .env.example to .env and configure the required variables:
bash
cp .env.example .env
Edit .env and set:
WHISPER_ASR_URL: URL of your Whisper ASR service for subtitle generation
Whisper ASR API Deploy
Deploy the whisper ASR API in GPU machine.
bash
docker run -d --gpus all -p 9000:9000 --name whisper \
-e ASR_MODEL=base \
-e ASR_ENGINE=openai_whisper -v $HOME/.cache:/root/.cache -e "UID=$UID" -e "GID=$GID" \
controlnet/whisper-api
Developing
bash
npm install
npm run dev
Web Interface
Visit http://localhost:5173 in your browser.
API Endpoints
The application provides the following API endpoints for programmatic access to video information.
1. Get Parsed Video Information (JSON)
- Endpoint:
/api/parse - Method:
GET - Purpose: Retrieves detailed video information as a JSON object.
- Query Parameter:
url(required): The Bilibili video URL or text containing the URL (e.g.,https://www.bilibili.com/video/BVxxxxxxorCheck this out: https://www.bilibili.com/video/BVxxxxxx some text). Remember to URL-encode this parameter if it contains special characters.
- Example Request:
GET http://localhost:5173/api/parse?url=BVxxxxx - Example Success Response (JSON):
json { "title": "示例视频标题", "upName": "示例UP主", "upMid": "123456", "upFans": "10.5万", "pic": "https://i0.hdslb.com/bfs/cover/xxxxxxxx.jpg", "views": "100万", "danmaku": "1万", "likes": "5000", "coins": "2000", "favorites": "1000", "shares": "500", "description": "这是一段视频简介...", "watchingTotal": "1000", "watchingWeb": "800", "cleanedUrl": "https://www.bilibili.com/video/BVxxxxx", "cid": "789012", "bvid": "BVxxxxx" }
2. Get Formatted Text for Copying
- Endpoint:
/api/copy - Method:
GET - Purpose: Retrieves a pre-formatted plain text string of the video information, suitable for direct copying.
- Query Parameter:
url(required): The Bilibili video URL or text containing the URL. Remember to URL-encode this parameter.
- Example Request:
GET http://localhost:5173/api/copy?url=https%3A%2F%2Fwww.bilibili.com%2Fvideo%2FBVxxxxx - Example Success Response (Plain Text):
text 标题: 示例视频标题 UP主: 示例UP主 粉丝: 10.5万 https://i0.hdslb.com/bfs/cover/xxxxxxxx.jpg 👀播放: 100万 💬弹幕: 1万 👍点赞: 5000 💰投币: 2000 📁收藏: 1000 🔗分享: 500 📝简介: 这是一段视频简介... 🏄♂️ 总共 1000 人在观看,800 人在网页端观看 https://www.bilibili.com/video/BVxxxxx
3. Generate Subtitles
- Endpoint:
/api/subtitles - Method:
POST - Purpose: Generates AI-powered subtitles from video audio using Whisper ASR.
- Request Body (JSON):
json { "bvid": "BVxxxxx", "cid": "xxxxxx" } - Example Success Response (JSON):
json { "success": true, "audioUrl": "https://...", "subtitles": { "text": "Complete transcript text here...", "segments": [ { "start": 0.0, "end": 3.5, "text": "Hello, welcome to this video" } ] } }
Note: This endpoint requires a configured Whisper ASR service URL in the environment variables.
Owner
- Name: ControlNet
- Login: ControlNet
- Kind: user
- Website: controlnet.space
- Repositories: 30
- Profile: https://github.com/ControlNet
Study on: Computer Vision | Artificial Intelligence
GitHub Events
Total
- Push event: 13
- Create event: 3
Last Year
- Push event: 13
- Create event: 3
Dependencies
- @eslint/compat ^1.2.5 development
- @eslint/js ^9.18.0 development
- @sveltejs/adapter-auto ^6.0.0 development
- @sveltejs/kit ^2.16.0 development
- @sveltejs/vite-plugin-svelte ^5.0.0 development
- @tailwindcss/postcss ^4.1.7 development
- @tailwindcss/vite ^4.0.0 development
- autoprefixer ^10.4.21 development
- eslint ^9.18.0 development
- eslint-config-prettier ^10.0.1 development
- eslint-plugin-svelte ^3.0.0 development
- globals ^16.0.0 development
- postcss ^8.5.3 development
- prettier ^3.4.2 development
- prettier-plugin-svelte ^3.3.3 development
- svelte ^5.0.0 development
- svelte-check ^4.0.0 development
- tailwindcss ^4.1.7 development
- typescript ^5.0.0 development
- typescript-eslint ^8.20.0 development
- vite ^6.2.6 development