Repository navigation
Impersonation becomes an option, not a mandate - #469
Merged
Merged
Conversation
added 8 commits
October 19, 2026 07:19
yt-dlp's --impersonate is documented as opt-in and its docs warn that forcing impersonation on every request may hurt download speed and stability, so the hard-coded --impersonate chrome becomes a Preferences → Advanced → General dropdown: None (yt-dlp's documented default, empty argv), Chrome, Edge or Safari. The choice rides on a single chokepoint (ytdlp_command) that every yt-dlp spawn routes through; the startup support probe only warms when a target is picked. Note: the default flips from always-chrome to None.
impersonate_index/impersonate_value are the defense against a stale or garbage stored target; cover the unknown-value and out-of-range fallbacks like the codec helpers beside them. Restore the test's impersonation value before asserting so a failure restores the memory backend for sibling tests, and fold the support-probe doc comment back onto one line.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
yt-dlp documents
--impersonateas opt-in and warns that forcing it on every request may hurt speed and stability. The hard-coded--impersonate chrome(added when TLS issues surfaced, ahead of any preference surface) becomes a proper choice under Preferences → Advanced → General:--ignore-config, so nothing else re-enables it--impersonate <target>(the curl_cffi client families per the yt-dlp README;firefoxis not a curl_cffi target)--list-impersonate-targetsprobe still vets the binary, now warmed at startup only when a target is pickedWiring: string key
impersonate-browser(schema),bind_combo_row(existing pattern), the flag enters argv only inytdlp_command(). Tests: default omits the flag; selecting a target produces exactly that flag; probe-failure path unchanged. Skipped: profile/OS variants (chrome:windows-10) and a dynamic--list-impersonate-targetspopulation — add when someone needs them.