Skip to content

๐ŸŽฅ Tampermonkey Bilibili Download - Powerful userscript for downloading videos from Bilibili platform

Notifications You must be signed in to change notification settings

Jeffrey0117/tampermonkey-bilibili-download

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

3 Commits
ย 
ย 
ย 
ย 

Repository files navigation

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! ๐ŸŽฌ๐Ÿ“ฅ

About

๐ŸŽฅ Tampermonkey Bilibili Download - Powerful userscript for downloading videos from Bilibili platform

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published