This Python script creates a Spotify playlist based on Billboard Hot 100 songs from a specified date.
- Retrieves Billboard Hot 100 songs from a given date using web scraping.
- Searches for each song on Spotify and adds them to a new playlist.
- Python 3.x
- Dependencies:
spotipylibrarybeautifulsoup4libraryrequestslibrary
-
Clone the repository:
git clone https://github.com/yourusername/spotify-playlist-creator.git cd spotify-playlist-creator -
Install dependencies:
pip install -r requirements.txt
- Create a Spotify Developer account and register your application.
- Obtain your client ID, client secret, and set the redirect URI.
- Configure your environment variables or update the script with your credentials.
-
Run the script:
python spotify_playlist_creator.py
-
Enter the date in YYYY-MM-DD format when prompted.
-
The script will create a new Spotify playlist titled "Taking you back to [date]" and populate it with the top songs from Billboard Hot 100 on that date.
- Ensure your Spotify account has proper permissions to create playlists and add songs.
- Adjust privacy settings (
public=False) inuser_playlist_createfunction as needed.