Skip to content

v0.6.1 - YouTubeSource Lean Refactor

Choose a tag to compare

@github-actions github-actions released this 13 Feb 10:55
· 56 commits to master since this release
2d32c91

Changed

  • Simplified YouTubeSource: Reduced from 632 to 242 lines (62% smaller) by removing 16 hardcoded yt-dlp constructor parameters
  • Unified yt-dlp options: Now uses ydl_opts dict for all yt-dlp options instead of individual parameters
  • Delegated to yt-dlp: PO tokens, cookies, JS runtime, and other advanced options are now handled by yt-dlp internally rather than being re-implemented

Breaking

  • YouTubeSource constructor now only accepts ydl_opts and download_archive parameters
  • Users who were passing individual yt-dlp options (po_token, visitor_data, impersonate_client, etc.) need to pass them via ydl_opts dict

How to migrate

# Before
YouTubeSource(po_token="xxx", visitor_data="yyy", player_clients=["tv"])

# After
YouTubeSource(ydl_opts={
    "extractor_args": {
        "youtube": {
            "po_token": ["web.gvs+xxx"],
            "visitor_data": "yyy",
            "player_client": ["tv"]
        }
    }
})

For most users, YouTubeSource now works out of the box without any configuration.