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_key
The 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_analytics
Current data content:
- Artist
- Album
- Track
- Artist Statistics
From the following sources:
- Spotify
- Youtube
Example of running:
make add_artist
make update_artist
make list_artists
make update_artist_stats
make update_all_artists_stats
Spotify:
make update_all_artists_stats --skip-spotify
Youtube:
make update_all_artists_stats --skip-youtube
make show_spotify_report
make show_youtube_report
make compare_artists_report
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.