This repository contains a Python-based music downloader that automates the process of searching for songs on YouTube, extracting the video IDs, and downloading the audio from the videos. The project uses libraries such as pytube for interacting with YouTube, BeautifulSoup for web scraping, and selenium for automating browser actions.
- Reads a list of song names from a text file.
- Searches for each song on YouTube using the
pytubelibrary. - Extracts the video ID of the first search result for each song.
- Downloads the audio from each video to a specified directory.
- Clone the repository and navigate to the project directory.
- Install the required Python libraries using pip:
pip install -r requirements.txt - Run the
python scrapper.pyto get list of song names toData/Music.txt. - Run the script:
python main.py - The audio files will be downloaded to the specified directory.
Please note that this project is for educational purposes only. Always respect the terms of service of any website you scrape or interact with programmatically.