DEV Community

Subhan Ali
Subhan Ali

Posted on

Scraping YouTube Channel Data Using Python – No API Needed!

Recently, I built a Python-based scraper that collects public video data from YouTube channels — without using the official API. This was a fun and insightful project where I explored how YouTube structures its data and how to extract information efficiently.


🔧 What It Does

The script can extract the following:

  • Video Titles
  • View Counts
  • Publish Dates
  • Video URLs
  • Thumbnails

It works directly from channel pages by sending requests and parsing the HTML with BeautifulSoup.


🎥 Demo Video

I recorded a short demo of the scraper in action:

👉 Watch on YouTube


💻 Source Code on GitHub

The complete Python code is open-source and available here:

👉 View GitHub Repository


🔍 Libraries Used

  • requests
  • BeautifulSoup (from bs4)
  • re for regex
  • json for parsing dynamic data blocks

📌 Why No API?

YouTube's official Data API has:

  • Quota limitations
  • Requires API key setup
  • More overhead for small-scale scrapers

So I challenged myself to build a solution that works purely via scraping — lightweight and fast.


💡 Next Steps

I’m considering adding:

  • CLI flags for custom inputs
  • CSV/JSON export support
  • Playlist/channel crawler
  • Error handling & logging

Would love feedback and suggestions from the community!


🤝 Let’s Connect

If you've worked on similar projects or want to collaborate, feel free to reach out. Also open to contributors or testers!

Top comments (0)