We have two separate Python scripts:
- Script A (
creator_scraper.py): Scrapes YouTube for creators using keyword-based discovery via the YouTube API. - Script B (
claude4.py): Handles Instagram handle extraction, fallback Google search, follower scraping, and scoring logic.
Your job is to combine them into one unified pipeline that:
- Discovers YouTube channels by keyword
- Finds associated Instagram handles
- Pulls IG follower data
- Outputs a clean CSV
🎯 End Goal:
A single script that:
- Accepts a list of keywords from
keywords.txt - Uses YouTube API to discover top channels per keyword
- For each channel:
- Pulls basic channel info (name, subs, YT link)
- Attempts to extract Instagram:
- From About page
- Or via Google fallback
- If found, uses
instaloaderto pull IG followers + bio
- Outputs a CSV in the following format:
| Creator | Key Platform | Niche | Followers | Link |
|---|---|---|---|---|
| John Doe | YouTube | Real Estate | 320k IG, 1.1M YouTube | instagram.com/johndoe |