{"id":24069421,"url":"https://github.com/4techsadiq/spotify-playlist-gen","last_synced_at":"2026-06-15T05:34:13.902Z","repository":{"id":270750930,"uuid":"911349552","full_name":"4TechSadiq/Spotify-Playlist-Gen","owner":"4TechSadiq","description":null,"archived":false,"fork":false,"pushed_at":"2025-01-02T20:12:14.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-06-15T05:34:11.393Z","etag":null,"topics":["python","spotipy"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/4TechSadiq.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-02T20:06:51.000Z","updated_at":"2025-01-02T20:12:52.000Z","dependencies_parsed_at":"2025-01-03T21:15:25.203Z","dependency_job_id":null,"html_url":"https://github.com/4TechSadiq/Spotify-Playlist-Gen","commit_stats":null,"previous_names":["4techsadiq/spotify-playlist-gen"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/4TechSadiq/Spotify-Playlist-Gen","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/4TechSadiq%2FSpotify-Playlist-Gen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/4TechSadiq%2FSpotify-Playlist-Gen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/4TechSadiq%2FSpotify-Playlist-Gen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/4TechSadiq%2FSpotify-Playlist-Gen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/4TechSadiq","download_url":"https://codeload.github.com/4TechSadiq/Spotify-Playlist-Gen/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/4TechSadiq%2FSpotify-Playlist-Gen/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34349925,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-15T02:00:07.085Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["python","spotipy"],"created_at":"2025-01-09T14:19:53.643Z","updated_at":"2026-06-15T05:34:13.885Z","avatar_url":"https://github.com/4TechSadiq.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Spotify Billboard Playlist Creator\n\nThis Python project creates a private Spotify playlist using the top songs from the Billboard Hot 100 chart for a specific date. The script scrapes song data from the Billboard website and uses the Spotify API to search for the tracks and add them to a newly created playlist in your Spotify account.\n\n## Prerequisites\n\n1. **Python 3.8 or higher**\n2. **Spotify Developer Account**\n   - Create a Spotify Developer Application [here](https://developer.spotify.com/dashboard/applications).\n   - Obtain your `CLIENT_ID` and `CLIENT_SECRET`.\n3. **Required Python Libraries**:\n   - `requests`\n   - `beautifulsoup4`\n   - `spotipy`\n   - `pprint` (optional, for debugging purposes)\n\nInstall the required libraries using pip:\n```bash\npip install requests beautifulsoup4 spotipy\n```\n\n## Setup\n\n1. Clone or download this repository.\n2. Open the script and update the following variables with your Spotify API credentials:\n   ```python\n   CLIENT_ID = \"your_client_id_here\"\n   CLIENT_SECRET = \"your_client_secret_here\"\n   REDIRECT_URL = \"http://example.com\"\n   ```\n3. Replace `USER` with your Spotify username.\n4. Make sure your Spotify application has the `playlist-modify-private` scope enabled in the dashboard.\n\n## Usage\n\n1. Run the script:\n   ```bash\n   python main.py\n   ```\n2. Enter the date in `YYYY-MM-DD` format when prompted. For example:\n   ```\n   Which year do you want to get into: Enter the date in YYYY-MM-DD format: 2020-08-15\n   ```\n3. The script will:\n   - Fetch the top 100 songs from the Billboard Hot 100 chart for the entered date.\n   - Search Spotify for the tracks.\n   - Create a private playlist named after the entered date.\n   - Add the tracks to the playlist.\n4. Upon success, you'll see a message:\n   ```\n   added successfully\n   ```\n\n## Script Overview\n\n- **`get_uri(songname, year)`**: Searches for the Spotify URI of a song by name and year.\n- **Web Scraping**: Uses `BeautifulSoup` to extract song titles from the Billboard Hot 100 chart page.\n- **Spotify API Integration**: Creates a private playlist and adds songs using the Spotify Web API.\n\n## Error Handling\n\nIf there's an error during playlist creation or track addition, the script will print the error message:\n```bash\nerror is: [Error details]\n```\n\n## Notes\n\n- Ensure your Spotify account is active and can create private playlists.\n- The script may fail to find certain songs due to mismatches between Billboard titles and Spotify track data.\n- Use a valid `User-Agent` header for requests to avoid being blocked by the Billboard website.\n\n## License\n\nThis project is open-source and available under the MIT License.\n\n## Author\n\nMohammed Sadiq Ali\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F4techsadiq%2Fspotify-playlist-gen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F4techsadiq%2Fspotify-playlist-gen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F4techsadiq%2Fspotify-playlist-gen/lists"}