Skip to main content

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

MIT

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.5.0.tar.gz (13.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

yt_live_scraper-1.5.0-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file yt_live_scraper-1.5.0.tar.gz.

File metadata

  • Download URL: yt_live_scraper-1.5.0.tar.gz
  • Upload date:
  • Size: 13.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for yt_live_scraper-1.5.0.tar.gz
Algorithm Hash digest
SHA256 80d7a64333d19244746cb78b7f7126d4c8a4bbbf768455e0e8ae3d1220256686
MD5 ba6cbac39d1f8f3382327750fad0c3e3
BLAKE2b-256 70f9e34f5c352c46d0a09a6e411f74f26e027101629aa666e32a5b46aea8eba8

See more details on using hashes here.

File details

Details for the file yt_live_scraper-1.5.0-py3-none-any.whl.

File metadata

File hashes

Hashes for yt_live_scraper-1.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 01afe0167fe47703df55dfeeedda788897a39e03597c10c8cb98ac4997107419
MD5 9116b3bcf5accc49b34e4a03ad1cb057
BLAKE2b-256 75e9d0d5da36823b6611032597b5d9a7fd8a59e8756becacdc94d75fd8dfc034

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page