Skip to content

pass yt-dlp http_headers through to actual fetches#85

Open
alexanderadam wants to merge 1 commit into
philippe44:masterfrom
alexanderadam:fix/yt_dlp_http_headers
Open

pass yt-dlp http_headers through to actual fetches#85
alexanderadam wants to merge 1 commit into
philippe44:masterfrom
alexanderadam:fix/yt_dlp_http_headers

Conversation

@alexanderadam

Copy link
Copy Markdown
Contributor

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.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant