# Using a separate file for this long help message to keep the main script clean. # It's imported by client tools that use the --request-params-json argument. REQUEST_PARAMS_HELP_STRING = """JSON string with per-request parameters to override server defaults. Example of a full configuration JSON showing default values (use single quotes to wrap it): '{ "_comment": "This JSON object allows overriding server-side defaults for a single request.", "cookies_file_path": "/path/to/your/cookies.txt", "context_reuse_policy": { "enabled": true, "max_age_seconds": 86400, "reuse_visitor_id": true, "reuse_cookies": true }, "_comment_context_reuse_policy": "Controls how the server reuses session context (cookies, visitor ID) from the account's previous successful request.", "_comment_reuse_visitor_id": "If true, reuses the visitor ID from the last session to maintain a consistent identity to YouTube. This is automatically disabled for TV clients to avoid bot detection.", "ytdlp_params": { "use_curl_prefetch": false, "skip_cache": false, "visitor_id_override_enabled": true, "webpo_bind_to_visitor_id": true, "extractor_args": { "youtubepot-bgutilhttp": { "base_url": "http://172.17.0.1:4416" }, "youtube": { "pot_trace": "true", "formats": "duplicate", "player_js_version": "actual" } } }, "_comment_ytdlp_params": "Parameters passed directly to the yt-dlp wrapper for info.json generation.", "_comment_webpo_bind_to_visitor_id": "If true (default), binds the PO Token cache to the visitor ID. Set to false for TV clients if caching issues occur, as this is not recommended for them.", "_comment_visitor_id_override_enabled": "If true (default), the server validates the visitor ID from the token generator and creates a new one if it is invalid. Set to false to force using the provided visitor ID without validation, which is useful for debugging.", "_comment_extractor_args": "Directly override yt-dlp extractor arguments. To use BGUtils in script mode, replace 'youtubepot-bgutilhttp' with 'youtubepot-bgutilscript'. The script path is '/opt/bgutil-ytdlp-pot-provider-server/build/generate_once.js'. To disable any explicit provider (like '--bgutils-mode none' on the server), remove both 'youtubepot-bgutilhttp' and 'youtubepot-bgutilscript' keys.", "session_params": { "lang": "en-US", "timeZone": "UTC", "location": "US", "deviceCategory": "MOBILE", "user_agent": "Mozilla/5.0 (iPad; CPU OS 16_7_10 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Mobile/15E148 Safari/604.1,gzip(gfe)", "visitor_rotation_threshold": 250 }, "_comment_session_params": "Parameters for the token generation session. `visitor_rotation_threshold` overrides the server's default request limit before a profile's visitor ID is rotated. Set to 0 to disable rotation.", "_comment_lang_and_tz": "`lang` sets the 'hl' parameter for YouTube's API, affecting metadata language. `timeZone` is intended to set the timezone for requests, but is not fully supported by yt-dlp yet." }'"""