Skip to content

[youtube] Use INNERTUBE_CONTEXT and x-goog-visitor-id header for API requests. #230

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Apr 11, 2021
Merged

[youtube] Use INNERTUBE_CONTEXT and x-goog-visitor-id header for API requests. #230

merged 9 commits into from
Apr 11, 2021

Conversation

coletdjnz
Copy link
Member

Please follow the guide below

  • You will be asked some questions, please read them carefully and answer honestly
  • Put an x into all the boxes [ ] relevant to your pull request (like that [x])
  • Use Preview tab to see how your pull request will actually look like

Before submitting a pull request make sure you have:

In order to be accepted and merged into youtube-dl each piece of code must be in public domain or released under Unlicense. Check one of the following options:

  • I am the original author of this code and I am willing to release it under Unlicense
  • I am not the original author of this code but it is in public domain or released under Unlicense (provide reliable evidence) [MODIFIED FROM UPSTREAM]

What is the purpose of your pull request?

  • Bug fix
  • Improvement
  • New extractor
  • New feature

Description of your pull request and other information

Explanation of your pull request in arbitrary form goes here. Please make sure the description explains the purpose and effect of your pull request and is worded well enough to be understood. Provide as much context and examples as possible.

This is an implementation based on ytdl-org/youtube-dl@1b0a13f which fixes ytdl-org/youtube-dl#28702

I've added some improvements (in addition to making it compatible with yt-dlp modifications):

  • Generalize the header & Innertube context extraction/generation so it is consistent throughout the YouTube extractor(s)
  • Implemented the fix in the comment extractor (probably not required, but to keep things consistent).

@pukkandan pukkandan merged commit f4f751a into yt-dlp:master Apr 11, 2021
nixxo pushed a commit to nixxo/yt-dlp that referenced this pull request Nov 22, 2021
* Obtain innertube_context, api_key and x-goog-visitor-id from webpage
* Generalize the header & Innertube_context extraction across YouTube extractors

Related: ytdl-org/youtube-dl@1b0a13f

Authored by: colethedj
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.

[YouTube] Infinite loop when downloading some playlists
2 participants