https://github.com/vdo/tubelist
A Python script to bulk add YouTube videos to a playlist.
https://github.com/vdo/tubelist
Last synced: over 1 year ago
JSON representation
A Python script to bulk add YouTube videos to a playlist.
- Host: GitHub
- URL: https://github.com/vdo/tubelist
- Owner: vdo
- License: apache-2.0
- Created: 2025-02-19T09:23:43.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-19T09:26:11.000Z (over 1 year ago)
- Last Synced: 2025-02-19T10:28:43.074Z (over 1 year ago)
- Language: Python
- Size: 9.77 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# tubelist
## Description
A Python script to bulk add YouTube videos to a playlist. The script allows you to select from your existing playlists and add multiple videos from a text file.
## Setup
1. Create and activate a Python virtual environment:
```bash
python3 -m venv myenv
source myenv/bin/activate
```
2. Install the required dependencies:
```bash
pip install google-api-python-client google-auth-httplib2 google-auth-oauthlib colorama tqdm
```
3. Set up YouTube API credentials:
- Go to the [Google Cloud Console](https://console.cloud.google.com/)
- Create a new project or select an existing one
- Enable the YouTube Data API v3
- Create OAuth 2.0 credentials
- Download the credentials and save them as `client_secrets.json` in the project directory
## Usage
1. Create a text file containing YouTube video URLs (one per line)
2. Run the script with optional duration filters:
```bash
# Basic usage
python main.py your_links.txt
# With duration filters (in minutes)
python main.py your_links.txt --min-duration 1 --max-duration 30
```
3. The script will:
- Show a list of your YouTube playlists with their current video count
- Let you choose which playlist to use
- Verify each video's availability and duration
- Add valid videos to the selected playlist