Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/agbocsardi/yt-comment-scraper.
Something went wrong. Try again.
524 B · 21 lines
Python
at main
123456789101112131415161718192021"""Example: scrape one channel and build DuckDB views.
uv run python scripts/scrape.py"""
from yt_comment_scraper import ScraperConfig, YouTubeScraper, build_duckdb
# Option A: configure in codeconfig = ScraperConfig.from_dict({ "channels": [ {"handle": "@ChannelName", "start_date": "2024-01-01", "end_date": "2025-01-01"}, ],})
# Option B: load from YAML# config = ScraperConfig.from_yaml("channels.yaml")
scraper = YouTubeScraper(config, output_dir="data")scraper.run()
build_duckdb("data")