Skip to content

About PO Token. #64

Open
Open

Description

@EPQLSA

Some videos on YouTube require cookies to pass age verification and a PO Token to download the best quality.
Without a PO Token, some formats may be unavailable, meaning the video can only be downloaded in lower quality, or the download may fail.
Is there a way for gdownloader to use a PO Token?

Activity

  1. EPQLSA commented on Sep 25, 2026

    @EPQLSA
    Author

    Additionally, would it be possible to replace the currently used compiled yt-dlp.exe with the version installed via pip? This version allows the PO Token Provider plugin to be installed directly with pip.

  2. hstr0100 commented on Sep 30, 2026

    @hstr0100
    Owner

    v1.7.12 will ship with optional support for generating PO Tokens. Enable it under Settings > Download Settings > yt-dlp > Use PO Token Provider. It's off by default.

    I couldn't confirm that it improves quality or format availability. In my tests, logged out, everything up to 4K downloads fine for me without it. Logged in, I hit yt-dlp/yt-dlp#12482 by default. With PO Tokens enabled, yt-dlp listed a 4K format, but the download failed with a 403, so treat this as experimental.

    If you try it, please let me know whether it helps or breaks anything once the release is out.

    Additionally, you can use the Python version of yt-dlp by enabling Settings > Download Settings > yt-dlp > Use System Install if Available.

  3. EPQLSA commented on Oct 1, 2026

    @EPQLSA
    Author

    I’ve upadted the latest release (v1.7.12) and briefly tested it with a video.

    When Use PO Token Provider is enabled, it doesn’t seem to have any effect. In fact, View Available Formats doesn’t show any available formats at all.
    When Use PO Token Provider is turned off, things remain the same as before: View Available Formats only shows one available resolution, 640×360 (muxed), even though the video is available in up to 1080p on the web.

    When I checked the updated gdownloader, I noticed that a pot-plugins folder had been added under Internal, containing a file named bgutil-ytdlp-pot-provider-rs.zip. It seems like this is the PO Token Provider solution used by gdownloader, but it doesn’t appear to be working. So, I tried another solution: https://github.com/Brainicism/bgutil-ytdlp-pot-provider
    I set up the PO Token Provider using the native method. I then successfully got gdownloader to use its own yt-dlp.exe to obtain a PO Token, which allowed it to retrieve all available formats (gdownloader can also obtain the PO Token when Querying Metadata) and download the video successfully. This solution appears to work, but the provider has to be set up manually.

    Later, I tried enabling Use System Install if Available while Use PO Token Provider was turned off. Since the version of yt-dlp I installed via pip, together with the yt-dlp-getpot-wpc plugin, had successfully obtained a PO Token before, I decided to try it with gdownloader. This plugin allows yt-dlp to obtain a PO Token by launching a Chrome/Chromium browser and automatically generating the token through YouTube’s WebPoClient. Therefore, when this plugin is used, it will launch a browser window to help obtain the PO Token. Since I use Edge, I also enabled “Enable Extra Arguments” and added the following extra argument:
    --extractor-args "youtubepot-wpc:browser_path=C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe"

    The result is that it does work. However, each time gdownloader downloads something, it invokes the plugin once for every command it executes. If options such as “Subtitles” or “Thumbnails” are enabled, the plugin is invoked several additional times, causing multiple browser windows to pop up. It is also ineffective when Querying Metadata.

    Therefore, the original solution for Use PO Token Provider is ineffective and needs to be improved or replaced.
    As for Use System Install if Available you can install yt-dlp and the plugin manually via pip, then use gdownloader’s Extra Argumentsfeature. It provides a partial solution, but it isn’t perfect.

  4. hstr0100 commented on Oct 1, 2026

    @hstr0100
    Owner

    I have a few questions to help me narrow down this issue, since I wasn't able to reproduce it on my end. YouTube can vary wildly between users due to A/B testing.

    1. Did you restart GDownloader at least once before testing whether the native PO Token solution shipped with v1.7.12 works? It only gets set up after an update check/restart, which, now that I think about it, is something I should fix in the next release.

    2. Do you have any extra arguments configured for yt-dlp? If so, could you share them?

    I'd appreciate it if you could export your settings and share the config.json here. That would give me a better chance of replicating the exact scenario where it fails.

    Thank you!

  5. EPQLSA commented on Oct 1, 2026

    @EPQLSA
    Author

    1.Yes. With this option enabled (Use PO Token Provider or Use System Install if Available), I tested it once, restarted gdownloader, and then tested it several more times. The results were the same.

    2.In addition to the previously mentioned argument:
    --extractor-args "youtubepot-wpc:browser_path=C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe"
    there are also several other arguments related to JSON and subtitles. Here are the complete arguments:
    --extractor-args "youtubepot-wpc:browser_path=C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" --write-info-json --write-subs --write-auto-sub --sub-langs en --sub-format srt --convert-subs srt
    The JSON file is something I want to obtain in addition to the video. As for subtitles, I want to download both the subtitles and auto-generated subtitles in a specific language. gdownloader’s built-in subtitle download feature downloads subtitles for every language, which is not only slow but also more likely to trigger a 429 error.

    3.The config.json:

    config.json

    By the way, I noticed that when Use System Install if Available is enabled, gdownloader uses the following for its download command:
    C:\Users\Administrator\AppData\Local\Programs\Python\Python313\Scripts\yt-dlp.exe
    Since Python can be installed in other locations, this path may not always be the default. To be safe, it would be a good idea to add another setting that allows users to specify either their Python installation path or the path to yt-dlp.exe within the Python installation.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions