Automatically sync music posts from r/theoverload to a Spotify playlist. This tool fetches daily music posts with sufficient upvotes and adds them to your Spotify playlist.
- 🎵 Multi-platform support: Works with YouTube, Spotify, SoundCloud, and Bandcamp links
- 📊 Smart filtering: Only includes posts with configurable minimum upvotes
- 🎯 Intelligent parsing: Extracts artist and track names from various title formats
- 🔄 Duplicate prevention: Avoids adding the same song multiple times
- ⏰ Daily automation: Run automatically at the end of each day
- 📝 Comprehensive logging: Track all activities and errors
-
Clone the repository
git clone https://github.com/yourusername/overload-spotify-sync.git cd overload-spotify-sync -
Run the setup script
./scripts/setup.sh
-
Configure your API credentials (see API Setup below)
nano .env
-
Test the sync
python3 overload_spotify_sync.py
-
Set up daily automation
./scripts/install_cron.sh
- Go to Reddit Apps
- Click "Create App" or "Create Another App"
- Choose "script" as the app type
- Note your
client_id(under the app name) andclient_secret
- Go to Spotify Developer Dashboard
- Click "Create an App"
- Fill in the app details
- Note your
Client IDandClient Secret - In Settings, add
http://localhost:8888/callbackas a Redirect URI
Edit the .env file with your credentials:
# Reddit API
REDDIT_CLIENT_ID=your_reddit_client_id_here
REDDIT_CLIENT_SECRET=your_reddit_client_secret_here
# Spotify API
SPOTIFY_CLIENT_ID=your_spotify_client_id_here
SPOTIFY_CLIENT_SECRET=your_spotify_client_secret_here
SPOTIFY_REDIRECT_URI=http://localhost:8888/callback
# Configuration
MIN_UPVOTES=3
PLAYLIST_NAME=notes from r/theoverload- Fetch Posts: Gets posts from r/theoverload from the last 24 hours with minimum upvotes
- Extract Music Info: Parses artist and track names from:
- YouTube video titles
- Spotify track URLs
- SoundCloud links
- Bandcamp pages
- Reddit post titles using various patterns
- Search Spotify: Finds matching tracks on Spotify using multiple search strategies
- Update Playlist: Adds new tracks to your Spotify playlist, avoiding duplicates
The tool recognizes these common patterns in post titles:
Artist - TrackArtist: TrackTrack by Artist[Artist] TrackArtist | TrackArtist "Track"
Run the sync manually:
python3 overload_spotify_sync.pyRun with custom configuration:
MIN_UPVOTES=5 PLAYLIST_NAME="My Custom Playlist" python3 overload_spotify_sync.pyFor reliable 24/7 automation that doesn't require your computer to be on:
- Follow the GitHub Actions Setup Guide
- Runs automatically daily at 11:30 PM UTC
- No local computer required - runs in the cloud
For local automation (requires your computer to be on):
scripts/setup.sh: Initial setup and dependency installationscripts/daily_sync.sh: Wrapper script for cron jobsscripts/install_cron.sh: Install daily cron job (runs at 11:30 PM)
# View current cron jobs
crontab -l
# Edit cron jobs manually
crontab -e
# Remove all cron jobs
crontab -rThe application creates two log files:
overload_spotify_sync.log: Detailed application logsdaily_sync.log: Daily cron job execution logs
View recent logs:
tail -f overload_spotify_sync.logoverload-spotify-sync/
├── README.md # This file
├── requirements.txt # Python dependencies
├── .env.example # Environment template
├── .gitignore # Git ignore rules
├── overload_spotify_sync.py # Main application
├── config.py # Configuration management
└── scripts/
├── setup.sh # Setup automation
├── daily_sync.sh # Cron wrapper
└── install_cron.sh # Cron installation
- Python 3.7+
- Reddit API credentials
- Spotify API credentials
- Internet connection
praw: Reddit API wrapperspotipy: Spotify API wrapperrequests: HTTP requestspython-dotenv: Environment variable management
"No posts found": Check if r/theoverload has new posts with enough upvotes
Spotify authentication errors: Ensure your redirect URI matches exactly in both .env and Spotify app settings
"Required environment variable not set": Check that all variables in .env are properly configured
Permission denied on scripts: Run chmod +x scripts/*.sh
Enable verbose logging by setting the log level in the script:
logging.basicConfig(level=logging.DEBUG, ...)- Fork the repository
- Create a feature branch:
git checkout -b feature-name - Make your changes
- Test thoroughly
- Submit a pull request
MIT License - see LICENSE file for details
This tool is for personal use only. Respect Reddit's and Spotify's API terms of service. The tool does not download or redistribute copyrighted content.