{"id":7043,"library":"bgutil-ytdlp-pot-provider","title":"BgUtils yt-dlp Proof-of-Origin Token Provider Plugin","description":"The `bgutil-ytdlp-pot-provider` is a Python plugin for `yt-dlp` (version 1.3.1) designed to generate and provide YouTube Proof-of-Origin (POT) tokens. This aims to bypass YouTube's 'Sign in to confirm you're not a bot' messages and 403 errors when using `yt-dlp` from flagged IP addresses. The plugin acts as an interface to an external POT generation service (either a Node.js/Deno HTTP server/script or a recommended Rust HTTP server/binary). The project is actively maintained with updates often tied to changes in YouTube's bot detection mechanisms.","status":"active","version":"1.3.1","language":"en","source_language":"en","source_url":"https://github.com/Brainicism/bgutil-ytdlp-pot-provider","tags":["yt-dlp","youtube","botguard","proof-of-origin-token","plugin","video-download","anti-bot"],"install":[{"cmd":"pip install -U bgutil-ytdlp-pot-provider","lang":"bash","label":"Install Python Plugin"}],"dependencies":[{"reason":"Required for the plugin to function; must be version 2025.05.22 or above.","package":"yt-dlp","optional":false},{"reason":"External application (binary or Docker) that generates the actual POT tokens. The Python plugin communicates with this provider. The Rust implementation is recommended for performance and ease of deployment.","package":"Rust POT Provider (bgutil-pot)","optional":false},{"reason":"Alternative runtime required if using the original JavaScript-based POT provider instead of the Rust version.","package":"Node.js (>= 20) or Deno (>= 2.0.0)","optional":true},{"reason":"Required if running either the Node.js/Deno or Rust POT provider as a Docker container.","package":"Docker","optional":true}],"imports":[{"note":"The functionality is integrated into yt-dlp, and you interact with it by configuring yt-dlp parameters or ensuring the external provider is running.","symbol":"Not applicable for direct import","correct":"This library is a yt-dlp plugin and is used via yt-dlp's command-line interface. Direct Python imports for end-user code are not typically needed or exposed."}],"quickstart":{"code":"# Step 1: Install and start the Rust POT Provider (recommended)\n# Download the appropriate binary from https://github.com/jim60105/bgutil-ytdlp-pot-provider-rs/releases\n# For example, for Linux x86_64:\n# wget https://github.com/jim60105/bgutil-ytdlp-pot-provider-rs/releases/latest/download/bgutil-pot-linux-x86_64\n# chmod +x bgutil-pot-linux-x86_64\n# mv bgutil-pot-linux-x86_64 /usr/local/bin/bgutil-pot\n# Start the provider (e.g., in a separate terminal or as a service):\n# bgutil-pot server --port 4416\n\n# Step 2: Install the Python plugin\n# pip install -U bgutil-ytdlp-pot-provider\n\nimport subprocess\nimport os\n\n# Example: Download a YouTube video using yt-dlp with the POT provider\n# Ensure the Rust POT server is running on the default port 4416 or configured correctly.\n\ndef download_video_with_pot(video_url):\n    try:\n        # yt-dlp automatically detects and uses the running POT provider.\n        # The 'youtubepot-bgutilhttp:' prefix is used by yt-dlp to specify\n        # using the bgutil-ytdlp-pot-provider HTTP mode.\n        command = [\n            \"yt-dlp\",\n            \"--extractor-args\", \"youtubepot-bgutilhttp:base_url=http://127.0.0.1:4416\",\n            video_url\n        ]\n        \n        print(f\"Attempting to download {video_url} with POT...\")\n        result = subprocess.run(command, check=True, capture_output=True, text=True)\n        print(\"Download successful!\")\n        print(result.stdout)\n    except subprocess.CalledProcessError as e:\n        print(f\"Error during download: {e}\")\n        print(f\"Stdout: {e.stdout}\")\n        print(f\"Stderr: {e.stderr}\")\n    except FileNotFoundError:\n        print(\"Error: yt-dlp command not found. Please ensure yt-dlp is installed and in your PATH.\")\n\n# Replace with your desired YouTube video URL\nvideo_to_download = \"https://www.youtube.com/watch?v=dQw4w9WgXcQ\" \n\ndownload_video_with_pot(video_to_download)\n","lang":"python","description":"This quickstart demonstrates how to use `yt-dlp` from Python to download a video, leveraging the `bgutil-ytdlp-pot-provider` plugin. It assumes the Rust POT Provider server is already running, which is the recommended setup. The Python code executes `yt-dlp` as a subprocess with the necessary extractor arguments to direct it to the POT provider."},"warnings":[{"fix":"Update both the plugin and your POT provider to the latest versions. Adjust `yt-dlp` extractor arguments: `youtube:getpot_bgutil_baseurl` became `youtubepot-bgutilhttp:base_url` and `youtube:getpot_bgutil_script` became `youtubepot-bgutilscript:script_path`.","message":"Major breaking changes occurred in version 1.0.0. Both the external POT provider (Node.js/Deno/Rust) and the Python plugin must be updated in sync. Extractor arguments changed significantly.","severity":"breaking","affected_versions":"Before 1.0.0"},{"fix":"Update `yt-dlp` to the latest version using `pip install -U yt-dlp`.","message":"The `yt-dlp` dependency requires version 2025.05.22 or above for compatibility with the plugin's features and to address YouTube changes.","severity":"breaking","affected_versions":"< 2025.05.22 of yt-dlp"},{"fix":"Use `--content-binding` instead of `--visitor-data` or `--data-sync-id` for script methods. Be aware that `disable_innertube` is no longer supported and may break POT generation for certain clients if no webpage is available.","message":"When using the standalone provider (server or script), passing `visitor_data` or `data_sync_id` is deprecated. YouTube changes also led to the removal of `disable_innertube`.","severity":"deprecated","affected_versions":"Before 1.0.0"},{"fix":"Monitor `yt-dlp` and `bgutil-ytdlp-pot-provider` releases for updates, which often include fixes for new YouTube changes. Consider alternative proxies or networks if issues persist.","message":"Providing a POT token does not guarantee bypassing all 403 errors or bot checks, as YouTube's detection mechanisms are constantly evolving. It may only help your traffic appear more legitimate.","severity":"gotcha","affected_versions":"All versions"},{"fix":"When running the Docker container for the POT provider, add `--net=host` to the `docker run` command if the provider needs to access a proxy running on the host machine.","message":"If using a local proxy server with the Dockerized POT provider, the Docker container's network isolation will prevent access unless `--net=host` is added to the `docker run` command.","severity":"gotcha","affected_versions":"All versions with Docker"},{"fix":"Use the HTTP server option (Node.js/Deno) or, preferably, the Rust POT provider in HTTP server mode for better performance and concurrency.","message":"The JavaScript-based POT generation script (as opposed to the HTTP server option or Rust implementation) is not recommended for high-concurrency usage. Each `yt-dlp` call incurs the overhead of spawning a new Node.js process.","severity":"gotcha","affected_versions":"All versions using JavaScript script mode"}],"env_vars":null,"last_verified":"2026-04-16T00:00:00.000Z","next_check":"2026-07-15T00:00:00.000Z","problems":[{"fix":"Ensure the POT provider server is running and accessible from where `yt-dlp` is executed. Verify the `base_url` in your `yt-dlp` extractor arguments matches the provider's address and port (default 4416). Check firewall settings if necessary.","cause":"The external POT provider (Node.js/Deno server or Rust server) is not running, is running on a different port/IP, or a firewall is blocking the connection.","error":"Error fetching PO Token from \"bgutil:http\" provider: Failed to connect to <IP>:<PORT>"},{"fix":"1. Restart the POT provider. 2. Update `bgutil-ytdlp-pot-provider` and `yt-dlp` to their latest versions. 3. Consider using a different IP address or proxy. 4. If applicable, try regenerating tokens with `--bypass-cache` on the provider.","cause":"YouTube has updated its bot detection, your IP might be flagged, or the provider/plugin versions are outdated.","error":"POT tokens not working / Downloads failing with 403 Forbidden"},{"fix":"Ensure `bgutil-ytdlp-pot-provider` is installed via `pip install -U bgutil-ytdlp-pot-provider`. Verify `yt-dlp` is version 2025.05.22 or newer (`yt-dlp --version`). If installed manually, confirm the plugin zip is in one of `yt-dlp`'s plugin directories.","cause":"The `bgutil-ytdlp-pot-provider` plugin is not correctly installed or `yt-dlp` is not finding it. This can also happen if `yt-dlp` is too old.","error":"yt-dlp: error: unrecognized arguments: --extractor-args youtubepot-bgutilhttp:base_url=..."},{"fix":"Ensure you are using the latest versions of both the POT provider and `yt-dlp`. If this error persists, it might indicate a more fundamental change by YouTube requiring further updates to the provider/plugin. Check the GitHub issues for the latest solutions.","cause":"YouTube changes may have impacted the attestation extraction process, potentially related to the `InnerTube` API or web_music client if a webpage is unavailable.","error":"Failed to extract initial attestation from the webpage"}]}