Bilibili DownloadX

Simple Bilibili video downloader with jQuery

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

作者
Phone “Jeffrey” Dr.
日安装量
0
总安装量
5
评分
0 0 0
版本
1.1.1
创建于
2025-09-14
更新于
2025-09-14
大小
51.4 KB
许可证
MIT
适用于

Bilibili Download Userscript

A powerful userscript for downloading videos from Bilibili with an intuitive floating control panel and batch download queue system.

🎬 Features

  • 🎯 Smart Video Detection: Automatically detects video information from Bilibili pages
  • 📥 Multiple Download Methods: Support for direct download, RPC, and AriaNG
  • 🎛️ Floating Control Panel: Clean, draggable interface with quality/format selection
  • 📋 Batch Download Queue: Add multiple videos and download them sequentially
  • 🔧 Quality Selection: Choose from 360P to 8K Ultra HD
  • 📱 Responsive Design: Works on all Bilibili video pages
  • ⚡ Real-time Progress: Live download progress with speed/size tracking
  • 🎨 Modern UI: Beautiful gradient design with smooth animations

🚀 Installation

Method 1: Direct Installation

  1. Download belibeli-download-only.user.js from this repository
  2. Open your browser and install a userscript manager:

  3. Open the downloaded .user.js file in your browser

  4. Click "Install" when prompted by your userscript manager

Method 2: Manual Installation

  1. Copy the entire content of belibeli-download-only.user.js
  2. Open your userscript manager
  3. Create a new userscript
  4. Paste the code and save

🎮 Usage

Basic Usage

  1. Navigate to any Bilibili video page
  2. Look for the floating download button (📥) in the bottom-right corner
  3. Click it to open the control panel
  4. Select your preferred quality and format
  5. Click "🎬 Download Current" to download the video

Advanced Features

Batch Download Queue

  1. On video list pages, hover over video thumbnails
  2. Click the "+" button that appears to add videos to queue
  3. Open the control panel and click "▶ Start Queue" to download all queued videos

Quality & Format Options

  • Quality: 360P, 480P, 720P, 1080P, 4K, 8K
  • Format: MP4, DASH, FLV
  • Method: Direct Download, RPC, AriaNG

RPC Download Setup

For advanced users who want to use external download managers:

  1. Set up an RPC server (like aria2 with RPC enabled)
  2. Configure the RPC settings in the control panel:
    • Domain: Your RPC server address (default: http://localhost)
    • Port: RPC port (default: 16800)
    • Token: Authentication token (if required)

🔧 Configuration

Environment Variables (for advanced users)

// In the userscript, you can modify these settings:
const CONFIG = {
    download_type: 'blob',     // 'blob' | 'rpc' | 'ariang' | 'web'
    format: 'mp4',            // 'mp4' | 'flv' | 'dash'
    base_api: 'https://api.bilibili.com/x/player/playurl',
    video_quality: '80',      // Default quality (80 = 1080P)

    // RPC Settings
    rpc_domain: 'http://localhost',
    rpc_port: '16800',
    rpc_token: '',

    // AriaNG Settings
    ariang_host: 'http://ariang.injahow.com/'
};

🎯 Supported Pages

The script works on all Bilibili video pages:

  • ✅ Regular videos (/video/av123456 or /video/BV1xx411x7xD)
  • ✅ Bangumi/Anime (/bangumi/play/ep123456 or /bangumi/play/ss12345)
  • ✅ Courses (/cheese/play/ep123456 or /cheese/play/ss12345)
  • ✅ Video lists and collections

🛠️ Technical Details

Architecture

  • Modular Design: Clean separation of concerns with dedicated classes
  • Error Handling: Robust error handling with retry mechanisms
  • API Integration: Uses official Bilibili APIs for reliable downloads
  • Cross-browser: Compatible with all modern browsers

Classes Overview

  • VideoInfo: Handles video information extraction
  • DownloadManager: Manages download operations
  • APIRequest: Handles API communications
  • DownloadQueue: Manages batch download queue
  • UIController: Controls the user interface
  • MessageSystem: Handles user notifications

Security & Privacy

  • ✅ No data collection
  • ✅ No external tracking
  • ✅ Uses only official Bilibili APIs
  • ✅ Respects user's download choices
  • ✅ No malicious code

🐛 Troubleshooting

Common Issues

Script not loading:

  • Make sure your userscript manager is enabled
  • Check that the script is enabled for Bilibili domains
  • Try refreshing the page

Download fails:

  • Check your internet connection
  • Try a different quality setting
  • Some videos may have region restrictions

Queue not working:

  • Make sure you're on a video list page
  • Try refreshing the page
  • Check browser console for errors

Debug Mode

Open browser console and use:

// Get current video info
window.BilibiliDownload.getVideoInfo()

// Get download URL for current video
window.BilibiliDownload.getVideoURL()

// Access configuration
window.BilibiliDownload.config

📝 Changelog

v1.1.0 (Latest)

  • ✨ Complete UI redesign with floating control panel
  • 🎯 Improved video detection and API integration
  • 📋 Added batch download queue system
  • 🔧 Enhanced error handling and retry mechanisms
  • 🎨 Modern gradient design with smooth animations
  • 📱 Better mobile responsiveness

v1.0.0

  • 🎬 Initial release with basic download functionality
  • 📥 Support for multiple download methods
  • ⚙️ Quality and format selection

🤝 Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

⚠️ Disclaimer

This userscript is for educational purposes only. Please respect Bilibili's terms of service and copyright laws. The author is not responsible for any misuse of this script.

🙏 Acknowledgments

  • Thanks to the Bilibili community for inspiration
  • Built with jQuery for cross-browser compatibility
  • Uses official Bilibili APIs for reliable operation

📞 Support

If you encounter any issues or have suggestions:

  1. Check the troubleshooting section above
  2. Open an issue on GitHub
  3. Provide detailed information about your problem

Happy downloading! 🎬📥