pass yt-dlp http_headers through to actual fetches#85
Open
alexanderadam wants to merge 1 commit into
Open
Conversation
yt-dlp returns a per-format http_headers dict (User-Agent, Accept,
Accept-Language, Sec-Fetch-Mode etc) that has to be sent on the
videoplayback fetch, otherwise the CDN can reject the request. the
plugin captured the dict into config->{headers} but never applied
it to any of the HTTP::Request objects it builds.
thread the headers through:
- WebM/M4a/MPEGTS get an optional headers arg in new()
- their probe HTTP::Requests carry the headers
- sysread_URL and sendRequest pick the headers off config
note: this fixes a real gap but is not enough on its own to play
SABR-locked videos. that needs yt-dlp with a working JS runtime.
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 returns a per-format http_headers dict that has to be sent on the videoplayback fetch. So far we captured the dict into config->{headers} but never applied it to any of the HTTP::Request objects it builds.