Use curl User-Agent to avoid GDPR consent redirects#647
Open
Hugo1380 wants to merge 5 commits intojoostlek:mainfrom
Open
Use curl User-Agent to avoid GDPR consent redirects#647Hugo1380 wants to merge 5 commits intojoostlek:mainfrom
Hugo1380 wants to merge 5 commits intojoostlek:mainfrom
Conversation
Owner
|
You might need to modify tests |
11 tasks
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #647 +/- ##
==========================================
- Coverage 98.81% 97.86% -0.95%
==========================================
Files 6 6
Lines 422 422
Branches 52 52
==========================================
- Hits 417 413 -4
- Misses 3 7 +4
Partials 2 2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Author
|
Should we modify the tests? |
Owner
|
I think so yes, make sure we call with the right header |
Author
|
I added test |
joostlek
requested changes
Mar 23, 2026
Owner
joostlek
left a comment
There was a problem hiding this comment.
The CI is failing, can you take a look?
Author
|
Sorry, it should be better now |
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.
Proposed Changes
The
is_short()method now uses acurlUser-Agent and disables redirects on the HEAD request.This prevents YouTube from redirecting EU-based clients to the GDPR consent page, which was causing all videos to be incorrectly detected as non-Shorts.
Related Issues
home-assistant/core#165630