Skip to content

DataDiggerJay/Spotify-PodMapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Podcast-Spotify-Matcher πŸŽ™οΈπŸŽ§

πŸ“Œ Overview

Podcast-Spotify-Matcher is a Python-based automation tool that:
βœ… Scrapes Apple Podcasts from a MySQL database.
βœ… Searches for matching podcasts on Spotify using the Spotify API.
βœ… Uses fuzzy string matching to improve accuracy.
βœ… Stores the matched Spotify podcast links in the database.
βœ… Supports batch processing for efficiency.


πŸš€ Features

βœ… Batch Processing: Handles multiple podcast records at once.
βœ… Spotify API Key Rotation: Prevents rate limits by switching credentials dynamically.
βœ… Logging & Debugging: Records errors, missing data, and matches for analysis.
βœ… Fuzzy Matching Algorithms: Ensures more accurate matches based on podcast titles.
βœ… Database Integration: Stores matched data in a MySQL database.


πŸ—οΈ Installation & Setup

1️⃣ Clone the Repository

git clone https://github.com/DataDiggerJay/Podcast-Spotify-Matcher.git
cd Podcast-Spotify-Matcher

2️⃣ Install Required Dependencies

pip install -r requirements.txt

πŸ”‘ How to Get Your Spotify Client ID & Secret Key

Step 1: Create a Spotify Developer Account

1️⃣ Go to the Spotify Developer Portal:
πŸ‘‰ https://developer.spotify.com/dashboard/
2️⃣ Log in with your Spotify account or create a new one.

Step 2: Create a New Application

1️⃣ Click "Create an App" on the Developer Dashboard.
2️⃣ Enter:

  • App Name: (e.g., PodcastMatcher)
  • App Description: (e.g., "A tool to match Apple Podcasts with Spotify.")
    3️⃣ Click Create and accept the terms.

Step 3: Get Your API Credentials

1️⃣ Once your app is created, go to the "Settings" tab.
2️⃣ Find your Client ID and Client Secret.
3️⃣ Copy both values and use them in your config.json file.


βš™οΈ Configuration (config.json Example)

Create a config.json file inside your project directory and add the following:

{
  "spotify": [
    {
      "client_id": "YOUR_SPOTIFY_CLIENT_ID",
      "client_secret": "YOUR_SPOTIFY_CLIENT_SECRET"
    }
  ],
  "database": {
    "host": "YOUR_DATABASE_HOST",
    "user": "YOUR_DATABASE_USER",
    "password": "YOUR_DATABASE_PASSWORD",
    "database": "YOUR_DATABASE_NAME"
  },
  "logging": {
    "log_file": "script.log",
    "log_level": "INFO"
  }
}

πŸ”΄ Do NOT share your config.json file publicly!
πŸ”΄ Add config.json to .gitignore to prevent leaks!


🎯 Run the Script

Once you’ve set up everything, run:

python script.py

The script will:
βœ… Fetch podcasts from Apple Podcasts database.
βœ… Search for matching podcasts on Spotify.
βœ… Store the results in MySQL.


πŸ› οΈ Requirements (requirements.txt)

requests
pymysql
logging
rapidfuzz

To install:

pip install -r requirements.txt

πŸ“‚ Project Structure

Podcast-Spotify-Matcher/
│── .gitignore         # Ignore sensitive files (config.json, logs)
│── README.md          # Documentation (this file)
│── script.py          # Main script
│── config.json        # Configuration (DO NOT SHARE!)
│── requirements.txt   # Dependencies

πŸ› οΈ Future Improvements

βœ… Multi-threading for faster processing.
βœ… Web interface to monitor processed podcasts.
βœ… OAuth-based authentication for better security.


πŸ“œ License

This project is open-source under the MIT License.

πŸ”— GitHub: Your GitHub Profile

πŸš€ Happy Coding! 🎧πŸ”₯

About

πŸ“Œ "Automated tool to match Apple Podcasts with Spotify using API & fuzzy matching."

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages