This repository contains code and documentation for scraping music statistics like Spotify Music Streams from various sources.
The Music Analytics Scraper project aims to collect and analyze music statistics from different platforms and sources. By scraping data from popular music streaming services, social media platforms, and other sources, we can gain insights into music trends, popularity, and user preferences.
And, by using this data, we can create reports, charts, and other visualizations to help us understand the music industry better.
To usage this repository, you need to have:
With, these keys:
- Copy .env.example file and rename it to .env
- Replace the following values of the variables with your keys
SPOTIFY_API_CLIENT_ID=your_spotify_client_id
SPOTIFY_API_CLIENT_SECRET=your_spotify_client_secret
YOUTUBE_API_KEY=your_youtube_api_keyThe result output will be saved in a PostgreSQL database, you can access the database using the following credentials (default) (Please see the docker-compose.yml file):
host: localhost
user: postgres
password: mypassword
database: music_analyticsCurrent data content:
- Artist
- Album
- Track
- Artist Statistics
From the following sources:
- Spotify
- Youtube
Example of running:
make add_artistmake update_artistmake list_artistsmake update_artist_statsmake update_all_artists_statsSpotify:
make update_all_artists_stats --skip-spotifyYoutube:
make update_all_artists_stats --skip-youtubemake show_spotify_reportmake show_youtube_reportmake compare_artists_reportContributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.




