A serverless bridge between Bilibili and YouTube with automated user mapping and danmaku synchronization
Features β’ Installation β’ Usage β’ Contributing
- Bilibili β YouTube: Show YouTube logo on Bilibili user pages with direct channel links
- YouTube β Bilibili: Show Bilibili logo on YouTube channels with direct space links
- Seamless switching between platforms for better quality or interaction
- Daily Scanning: Automatically scan Bilibili hot rankings, must-watch list, and top creators
- Cold Start: Initial scan of top 100 creators and popular users (100k+ followers)
- Smart Deduplication: Avoid duplicate processing across different ranking lists
- Level 1 (95%+ confidence): YouTube verified channel + name match
- Level 2 (85%+ confidence): Cross-platform bio mentions
- Level 3 (70%+ confidence): Username, avatar, video similarity
- Level 4: Manual review for edge cases
- Fetch Bilibili danmaku and display on YouTube videos
- Bilibili-style rendering with scrolling, top, and bottom positioning
- Authentic font, colors, and animations
- GitHub Actions: Automated workflows for scanning and verification
- Cloudflare Workers: User submission endpoint with rate limiting
- jsDelivr CDN: Fast global delivery of mapping data
- Zero hosting costs: No server required!
- Efficient hash-based directory structure (inspired by Git objects)
- O(1) lookup performance
- Bidirectional mapping (Bilibili β YouTube)
- Download the latest release from Releases
- Extract the ZIP file
- Open
chrome://extensions/ - Enable "Developer mode"
- Click "Load unpacked" and select the extracted folder
- Download the Firefox version from Releases
- Open
about:addons - Click the gear icon β "Install Add-on From File"
- Select the downloaded XPI file
# Clone the repository
git clone https://github.com/palemoky/BiliTube-Wormhole.git
cd BiliTube-Wormhole
# Install dependencies
bun install
# Start development mode
bun run dev
# Build for production
bun run build- Install the browser extension (see Installation above)
- Browse Bilibili or YouTube as usual
- See platform logos on user/channel pages with known mappings
- Click logos to switch platforms instantly
- Watch YouTube videos with Bilibili danmaku (if available)
If you know a Bilibili user who also has a YouTube channel:
- Visit our submission page
- Enter the Bilibili UID and YouTube Channel ID
- Submit - our system will verify automatically!
# Scan Bilibili users
BILIBILI_SESSDATA=your_sessdata bun run workflow:scan
# Verify mappings
BILIBILI_SESSDATA=your_sessdata \
YOUTUBE_API_KEY=your_api_key \
USERS_JSON='[{"uid":"123456"}]' \
bun run workflow:verifycd worker
bun install
# Set secrets
wrangler secret put GITHUB_TOKEN
# Deploy
bun run worker:deploygraph LR
%% ====================
%% Client Side
%% ====================
subgraph Client_Side[Client Side]
User((User))
Ext[Browser Extension]
end
%% ====================
%% Serverless Edge
%% ====================
subgraph Serverless_Edge[Serverless Edge]
CF[Cloudflare Worker]
end
%% ====================
%% GitHub Platform
%% ====================
subgraph GitHub_Ecosystem[GitHub Ecosystem]
Issues[GitHub Issues]
Action[GitHub Actions]
Repo[GitHub Repository]
end
%% ====================
%% External Services
%% ====================
subgraph External_Services[External Services]
BiliAPI[Bilibili API]
YtAPI[YouTube API]
CDN[jsDelivr CDN]
end
%% ====================
%% Submission Flow
%% ====================
User -->|Submit Mapping| CF
CF -->|Create Issue| Issues
Issues -->|Trigger Workflow| Action
%% ====================
%% Verification Flow
%% ====================
Action -->|Validate Source| BiliAPI
Action -->|Validate Source| YtAPI
%% ====================
%% Result Handling
%% ====================
Action -->|Verified β Update JSON| Repo
Action -->|Verified / Invalid β Comment & Close| Issues
%% ====================
%% Distribution Flow
%% ====================
Repo -.->|CDN Sync| CDN
Ext -->|Fetch Mapping| CDN
CDN -->|Serve JSON| Ext
%% ====================
%% Styling
%% ====================
style CF fill:#f96,stroke:#333
style Action fill:#69c,stroke:#333,color:#fff
style Repo fill:#9cf,stroke:#333
style CDN fill:#ff9,stroke:#333
- Daily Scan: GitHub Actions runs at 00:00 UTC
- User Discovery: Scan Bilibili rankings for new users
- Verification: Multi-level confidence scoring
- Storage: Write to sharded JSON files
- CDN: Publish to jsDelivr for global access
- Extension: Fetch and display mappings
We welcome contributions! Here's how you can help:
Know a creator on both platforms? Submit a mapping!
Found a bug or incorrect mapping? Open an issue
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
BILIBILI_SESSDATA: (Optional) Bilibili session cookie- When needed: For WBI-authenticated endpoints or to avoid rate limits
- Can skip: Basic user info and public rankings work without it
- How to get: Login to Bilibili β F12 β Application β Cookies β SESSDATA
YOUTUBE_API_KEY: YouTube Data API v3 key (Required)GITHUB_TOKEN: Automatically provided by GitHub Actions
GITHUB_TOKEN: GitHub personal access tokenGITHUB_OWNER: Repository owner (default:palemoky)GITHUB_REPO: Repository name (default:BiliTube-Wormhole)
- Free Tier: 10,000 units/day
- Search Cost: ~100 units per search
- Strategy: Use time-based processing, prioritize high-confidence matches
- No official limits but use rate limiting to avoid anti-bot measures
- Default delay: 1000ms between requests
This project is licensed under the MIT License - see the LICENSE file for details.
- bilibili-youtube-danmaku - Original inspiration
- WXT Framework - Modern browser extension framework
- Bun - Fast JavaScript runtime
- π§ Email: [email protected]
- π¬ Discussions: GitHub Discussions
- π Issues: GitHub Issues
Made with β€οΈ by the BiliTube-Wormhole team