Skip to content

transcribe: download_audio cannot receive yt-dlp cookies or a JS runtime — YouTube's bot wall is unfixable from graphify on server IPs #3049

Description

@Azeem1985

What happens: On a datacenter/VPS IP, every YouTube download through graphify add <youtube-url> or graphify.transcribe.download_audio() fails with yt-dlp's Sign in to confirm you're not a bot (player responses come back LOGIN_REQUIRED for every client — web, tv, tv_embedded, android, mweb, over IPv4 and IPv6). Search (ytsearchN:) still works; only download is walled.

Why graphify can't be fixed from outside: yt-dlp's FAQ prescribes --cookies for this, and modern yt-dlp wants --js-runtimes node for full YouTube format coverage. Both exist on the yt-dlp CLI, but download_audio() builds its YoutubeDL options dict inline (graphify/transcribe.py, the ydl_opts = {...} block) with no pass-through — a user who exports cookies.txt has no way to hand it to graphify. (The yt-dlp Python API also does not read yt-dlp config files, so even a user-level yt-dlp config is ignored.)

Proposed fix (mirrors the module's existing GRAPHIFY_WHISPER_MODEL env convention):

  • GRAPHIFY_YTDLP_COOKIEScookiefile
  • GRAPHIFY_YTDLP_JS_RUNTIMES (comma-separated, e.g. node) → js_runtimes

No env set → options unchanged. PR with tests incoming from TelB-io.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions