yt-live-scraper documentation
- Author:
Jonny Bergdahl
- Email:
- Date:
2026-03-01
- Version:
0.1.0
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 display name |
|
|
URL of the channel’s avatar image |
|
|
YouTube video ID |
|
|
Stream title |
|
|
Scheduled start time (UTC) |
|
|
Full YouTube watch URL |
|
|
URL of the stream’s thumbnail image |
|
|
|
Development
# Install with dev dependencies
pip install -e ".[dev]"
# Run tests
pytest
License
Contents: