No project description provided
Project description
Official repository: https://github.com/Brainicism/bgutil-ytdlp-pot-provider
BgUtils POT Provider
A proof-of-origin token (POT) provider to be used alongside coletdjnz's POT plugin framework. We use LuanRT's Botguard interfacing library to generate the token.
This is used to bypass the 'Sign in to confirm you're not a bot' message when invoking yt-dlp from an IP address flagged by YouTube. See https://github.com/yt-dlp/yt-dlp-wiki/pull/40/files for more details.
The provider comes in two parts:
- Provider: An HTTP server that generates the POT, and has interfaces for the plugin to retrieve data from
- Provider plugin: uses POT plugin framework to retrieve data from the provider, allowing yt-dlp to simulate having passed the 'bot check'
Installation
[!CAUTION] This plugin is not ready for general use and is awaiting changes to be merged in yt-dlp for it to be functional. Follow https://github.com/yt-dlp/yt-dlp/pull/10648 for updates.
Default port number is 4416. If you want to change this, be sure to change it in both the provider and plugin code.
1. Set up the provider
The provider is a Node.js HTTP server. You have two options of running it: as a prebuilt docker image, or manually as a node application.
Docker:
docker run --name bgutil-provider -d -p 4416:4416 brainicism/bgutil-ytdlp-pot-provider
Native:
cd server/
yarn install --frozen-lockfile
npx tsc
node build/main.js
2. Install the plugin
PyPI:
python3 -m pip install -U bgutil-ytdlp-pot-provider
This will automatically install coletdjnz's POT plugin framework if haven't installed it yet.
Manual:
- Make sure you have coletdjnz's POT plugin framework installed already (must be at least version 0.0.2 or newer).
- Download the latest release zip from releases. Install it by placing the zip into one of the plugin folders.
Usage
Environment Variables
- TOKEN_TTL: The time in hours for a PO token to be considered valid. While there are no definitive answers on how long a token is valid, it has been observed to be valid for atleast a couple of days. Default: 6
Endpoints
- POST /get_pot: Accepts a
visitor_data
(unauthenticated),data_sync_id
(authenticated) or an empty body in the request body. If no identifier is passed, a new unauthenticatedvisitor_data
will be generated. Returnspo_token
and the associated identifiervisit_identifier
. - POST /invalidate_caches: Resets the PO token cache, forcing new tokens to be generated on next fetch
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file bgutil_ytdlp_pot_provider-0.3.0.tar.gz
.
File metadata
- Download URL: bgutil_ytdlp_pot_provider-0.3.0.tar.gz
- Upload date:
- Size: 2.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 084e9fc1f2c0c0e9eb75d6b0edef7eb4c6e4cbc84cc24d5c8a36c6b282574703 |
|
MD5 | 853ee9eb68c0f97fc44ee1d47c03a287 |
|
BLAKE2b-256 | c5f8723fe187941a8d5d9da257e559bc74a713edf57ee9e570fa5634e68cd3fb |
File details
Details for the file bgutil_ytdlp_pot_provider-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: bgutil_ytdlp_pot_provider-0.3.0-py3-none-any.whl
- Upload date:
- Size: 3.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8e57e8cc8ddd7f5c4ae555ff01eb2a7a7be9d585dadecba7a66c7800fed21794 |
|
MD5 | 903617e9b19d41131369de22774d8154 |
|
BLAKE2b-256 | d5076d8a743c80b96d919b37d40c6bfe95e9a4ecc4188993253fb923906cddc6 |