This Python script fetches the Billboard Hot 100 chart from a specified date and creates a Spotify playlist with the top songs from the chart. The script utilizes the Spotify API to authenticate, search for songs, and manage playlists and uses BeautifulSoup for web scraping.
Fetches the Billboard Hot 100 chart for a specific date. Extracts song titles and corresponding artist names from the chart. Searches for these songs on Spotify. Creates a private Spotify playlist and adds the fetched songs.
git clone https://github.com/your-username/create_spotify_playlist.git cd create_spotify_playlist
pip install requests spotipy python-dotenv beautifulsoup4
Go to the Spotify Developer Dashboard. Create a new app and note the Client ID and Client Secret. Set a redirect URI (e.g., http://localhost:8888/callback).
SPOTIPY_CLIENT_ID=your_spotify_client_id SPOTIPY_CLIENT_SECRET=your_spotify_client_secret SPOTIPY_REDIRECT_URI=http://localhost:8888/callback