Scrape YouTube channels for live and upcoming stream events
Project description
yt-live-scraper
A Python library and CLI tool for scraping YouTube channels for live and upcoming stream events.
Installation
pip install yt-live-scraper
Documentation
The full library documentation can be found here.
CLI Usage
# Show upcoming streams for one or more channels
yt-live-scraper @home_assistant @superhousetv
# Output as JSON
yt-live-scraper @home_assistant --json
# Only show streams from a specific date onwards
yt-live-scraper @home_assistant --from 2026-03-01
Library Usage
Get upcoming streams
from yt_live_scraper import get_upcoming_streams
streams = get_upcoming_streams(["@home_assistant", "@superhousetv"])
for stream in streams:
print(stream)
Check if a stream is live
from yt_live_scraper import is_stream_live
if is_stream_live("dQw4w9WgXcQ"):
print("Stream is live!")
UpcomingStream fields
Each UpcomingStream object contains:
| Field | Type | Description |
|---|---|---|
channel |
str |
Channel display name |
channel_thumbnail_url |
str |
URL of the channel's avatar image |
video_id |
str |
YouTube video ID |
title |
str |
Stream title |
scheduled_start |
datetime |
Scheduled start time (UTC) |
url |
str |
Full YouTube watch URL |
thumbnail_url |
str |
URL of the stream's thumbnail image |
live |
bool |
True if the stream is currently live |
Development
# Install with dev dependencies
pip install -e ".[dev]"
# Run tests
pytest
License
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
yt_live_scraper-1.4.0.tar.gz
(12.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file yt_live_scraper-1.4.0.tar.gz.
File metadata
- Download URL: yt_live_scraper-1.4.0.tar.gz
- Upload date:
- Size: 12.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e147f22778087c0aa36b00c87c25df391e463a40f338fb598ae3ec0160fea984
|
|
| MD5 |
29f210d9dedcbdef0c4312ba7e2d29cb
|
|
| BLAKE2b-256 |
c2aff14ed8533060e25119f188f2314ab238c9dd60101b84e772dfa13d43b8ee
|
File details
Details for the file yt_live_scraper-1.4.0-py3-none-any.whl.
File metadata
- Download URL: yt_live_scraper-1.4.0-py3-none-any.whl
- Upload date:
- Size: 8.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b98d4538b25dbdf552ab14a5f3bf511cad33acbf8eda64d7e4c24e356a2866a6
|
|
| MD5 |
91f71fb28fb6494d71a2a7afd26e43ac
|
|
| BLAKE2b-256 |
103500b9351032bd822f12c7194102292c4fdc8682e2504fb948f52a4e79d0e3
|