A Python script to create a Spotify playlist based on Billboard Hot 100 songs for a specific date.
This script utilizes BeautifulSoup and Spotipy to scrape Billboard Hot 100 songs for a given date and create a Spotify playlist with those songs.
- Fetches Billboard Hot 100 songs for a specified date.
- Searches for each song on Spotify and retrieves its URI.
- Creates a private Spotify playlist with the fetched songs.
Before you begin, ensure you have met the following requirements:
- Python 3.6 or later installed
- Spotify Developer Account with a registered application
- Billboard website access
-
Clone the repository:
git clone https://github.com/asultanli/spotify-billboard-playlist.git
-
Install the required dependencies:
pip install -r requirements.txt
-
Create a
.env
file in the project root and add your Spotify application credentials:CLIENT_ID=your_client_id CLIENT_SECRET=your_client_secret USER_ID=your_spotify_username
-
Run the script:
python main.py
- Run the script and follow the prompts.
- Visit the provided authorization URL in your browser and authorize the app.
- Enter the authorization code back in the terminal.
- Input the date for the Billboard Hot 100 songs.
- The script will create a private Spotify playlist with the fetched songs.
- Sultanli Aykhan