YouTube Download Button with Cobalt API
Description
This user script adds a download button to YouTube videos, allowing users to download videos or audio using the Cobalt API.
How It Works
The script integrates a download button into YouTube's UI, enabling users to download video or audio in their preferred format and quality. It leverages the Cobalt API to facilitate the downloading process.
Key Functions
- Cobalt API Request: Sends a request to the Cobalt API to generate a download link.
- Fetch Video Info: Retrieves available video qualities and formats from the YouTube page.
- Show Quality Popup: Displays a popup for the user to select the format and quality before downloading.
- Remove Native YouTube Download Button: Removes the native YouTube Premium Download button, whether it be in overflow or not.
Usage
- Install a userscript manager like Tampermonkey.
- Add this user script to the manager.
- Visit any YouTube video page.
- Click the newly added "Download" button.
- Select the desired format and quality from the popup.
- Click "Download" to start the download process.
Credits