https://github.com/datadiggerjay/spotify-podmapper
📌 "Automated tool to match Apple Podcasts with Spotify using API & fuzzy matching."
https://github.com/datadiggerjay/spotify-podmapper
api automation mysql podcasts python spotify web-scrapping
Last synced: 2 months ago
JSON representation
📌 "Automated tool to match Apple Podcasts with Spotify using API & fuzzy matching."
- Host: GitHub
- URL: https://github.com/datadiggerjay/spotify-podmapper
- Owner: DataDiggerJay
- Created: 2025-02-03T09:37:59.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-03T09:58:32.000Z (over 1 year ago)
- Last Synced: 2025-06-15T09:41:06.092Z (about 1 year ago)
- Topics: api, automation, mysql, podcasts, python, spotify, web-scrapping
- Language: Python
- Homepage: https://github.com/DataDiggerJay/Spotify-PodMapper
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# **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**
```sh
git clone https://github.com/DataDiggerJay/Podcast-Spotify-Matcher.git
cd Podcast-Spotify-Matcher
```
### **2️⃣ Install Required Dependencies**
```sh
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/](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:
```json
{
"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:
```sh
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`)**
```txt
requests
pymysql
logging
rapidfuzz
```
To install:
```sh
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](https://github.com/DataDiggerJay/)
🚀 **Happy Coding!** 🎧🔥