feat: update impersonation header for YouTube downloads#6
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the yt-dlp impersonate configuration used by the Flask backend when downloading YouTube audio/video, switching the impersonation target from generic Chrome to a specific Chrome version.
Changes:
- Updated yt-dlp
impersonatevalue fromchrometochrome-136for audio downloads. - Updated yt-dlp
impersonatevalue fromchrometochrome-136for video downloads.
Comments suppressed due to low confidence (2)
backend/app.py:34
impersonateis set tochrome-136but the hard-codedUser-Agentstill advertises Chrome 120. This mismatch can defeat the point of impersonation and may increase bot-detection risk. Align the UA with the impersonation target (or remove the UA override if you intendimpersonateto control headers).
'impersonate': 'chrome-136',
'http_headers': {
'User-Agent': (
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) '
'AppleWebKit/537.36 (KHTML, like Gecko) '
'Chrome/120.0.0.0 Safari/537.36'
backend/app.py:66
- Same mismatch here:
impersonate: chrome-136butUser-Agentis still Chrome 120. These should be consistent to avoid sending contradictory client signals.
'impersonate': 'chrome-136',
'http_headers': {
'User-Agent': (
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) '
'AppleWebKit/537.36 (KHTML, like Gecko) '
'Chrome/120.0.0.0 Safari/537.36'
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
No description provided.