This repository contains two Python scripts for downloading videos from a YouTube playlist and renaming them based on the titles from the playlist.
- Python 3.x
pytube
library
-
Install Python: If you haven't already, download and install Python from python.org.
-
Install pytube: You can install the
pytube
library using pip. Open your terminal or command prompt and run:pip install pytube
-
Run the Script: Execute the first script to download the playlist:
python youtube_playlist_downloader.py
-
Get Titles: This script will fetch the titles of the videos in the playlist and save them to a text file called
video_titles.txt
. -
Add to IDM: Use Internet Download Manager (IDM) to import the
video_titles.txt
file as a batch. This will allow IDM to download all the videos in the playlist. -
Download Videos: Start the download process in IDM. Ensure that the videos are saved in a new folder.
-
Run the Title Fixing Script: After downloading, run the second script to rename the downloaded videos based on their titles:
python fix_titles.py
-
Input the Paths: When prompted, provide:
- The path to the YouTube playlist (for fetching titles).
- The path to the folder where the videos were downloaded.
-
Renaming: The script will rename the downloaded videos according to the titles in the playlist.
- YouTube Playlist URL:
https://www.youtube.com/playlist?list=YOUR_PLAYLIST_ID
- Video Folder Path:
C:\Users\Lokmane\Downloads\YourVideoFolder
- Ensure that the number of videos downloaded matches the number of titles fetched; otherwise, the renaming process may fail.
- If you encounter any issues, check if the paths provided are correct and if you have the necessary permissions.