Configuration Overview¶
Artist Scraper uses a JSON configuration file to store API credentials and settings.
Creating the Configuration File¶
Generate an example configuration file:
This creates a config.json file with the following structure:
{
"spotify": {
"client_id": "your_spotify_client_id_here",
"client_secret": "your_spotify_client_secret_here",
"refresh_token": "your_spotify_refresh_token_here"
},
"youtube_music": {
"auth_file": "ytmusic_auth.json",
"client_id": "your_google_client_id_here (optional)",
"client_secret": "your_google_client_secret_here (optional)"
},
"lidarr": {
"url": "http://localhost:8686",
"api_key": "your_lidarr_api_key_here"
},
"musicbrainz": {
"user_agent": "artistscraper/0.1.0 (your-email@example.com)"
},
"output": {
"csv_file": "artists.csv",
"skipped_log": "skipped_artists.log"
}
}
Configuration Sections¶
Required Sections¶
- Spotify: Spotify API credentials
- YouTube Music: YouTube Data API v3 credentials
- MusicBrainz: User agent for MusicBrainz API
Optional Sections¶
- Lidarr: Only needed if using
--lidarrflag - Output: Customize output file paths (optional)
Security¶
Keep Your Credentials Safe
- Never commit
config.jsonto version control - The file is already in
.gitignore - Store credentials securely
- Don't share your config file publicly
Using a Custom Configuration File¶
By default, Artist Scraper looks for config.json in the current directory. You can specify a different path:
Or use the short form:
Next Steps¶
Configure each API service: