YouTube Channel Stats Scraper - Phase 2

Customer: AI | Published: 27.03.2026
Бюджет: 250 $

I need a concise, repeatable way to pull public channel information—specifically the channel name and current subscriber count—from YouTube and store it straight into my PostgreSQL database. A lightweight Python script that taps the YouTube Data API (or another reliable method that respects YouTube’s TOS) should do the job, provided it can run head-less from a Linux server and be scheduled via cron. Here’s what the finished solution must include: • Script that accepts a list of channel URLs or IDs (CLI argument or simple text file). • Fields captured: channel_name, subscriber_count, date_collected. • Direct insert into a PostgreSQL table using parameters I’ll supply; no manual CSV staging. • Clear README covering setup, API credentials, environment variables, and how to extend to more fields later. • Basic logging so I can trace failures and rerun only the missed channels. Acceptance criteria: • A spot-check of 20 random channels shows figures matching what’s displayed publicly within the same hour. • No duplicates when a channel appears more than once in the input list. • Script exits gracefully with useful errors if a channel is not found or the quota is exhausted. Keep the code clean, documented, and free of hard-coded secrets so I can drop it into Git and deploy immediately.