Skip to content

fix[click download: Access denied by the platform]#52

Open
mazezen wants to merge 1 commit into
averygan:mainfrom
mazezen:fix_download_access_issue51
Open

fix[click download: Access denied by the platform]#52
mazezen wants to merge 1 commit into
averygan:mainfrom
mazezen:fix_download_access_issue51

Conversation

@mazezen
Copy link
Copy Markdown

@mazezen mazezen commented May 25, 2026

Issue: Fix Downloading YouTube videos: Access denied by the platform #51

Add the following:

  1. Obtain the cookie, and include it when downloading. Set it to an empty string to disable
  2. Increase the number of retry attempts for failures

code:
`

Path to yt-dlp (use Homebrew version which has YouTube fixes)

YT_DLP_PATH = os.environ.get("YT_DLP_PATH", "/opt/homebrew/bin/yt-dlp")

Browser for yt-dlp cookie extraction (set to empty string to disable)

COOKIES_BROWSER = os.environ.get("COOKIES_BROWSER", "brave")

Build --cookies-from-browser args if configured

COOKIE_ARGS = ["--cookies-from-browser", COOKIES_BROWSER] if COOKIES_BROWSER else []

cmd = [YT_DLP_PATH, "--no-playlist", "-o", out_template]
cmd += COOKIE_ARGS
cmd += ["--extractor-retries", "3", "--retries", "5"]
`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant