Skip to content
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

[ie/youtube] Add player_params extractor arg #7719

Merged
merged 1 commit into from
Jul 29, 2023

Conversation

coletdjnz
Copy link
Member

@coletdjnz coletdjnz commented Jul 28, 2023

This will be useful for debugging

Superceeds #7458

Template

Before submitting a pull request make sure you have:

In order to be accepted and merged into yt-dlp each piece of code must be in public domain or released under Unlicense. Check all of the following options that apply:

  • 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)

What is the purpose of your pull request?

Copilot Summary

🤖 Generated by Copilot at d3b338f

Summary

🎬🔧📺

Add player_params option for YouTube extractor to customize player requests. Update README.md to document the new option and its usage.

Sing, O Muse, of the cunning code that gave
To mortal users a new option brave
To alter player_params as they please
And thus control the formats of YouTube's streams.

Walkthrough

  • Add a new option player_params to the youtube extractor that allows the user to specify custom YouTube player parameters for player requests (link, link, link, link)
    • Remove the hardcoded _PLAYER_PARAMS attribute from the YoutubeIE class and use the user-provided option instead (link)
    • Modify the _extract_player_response method of the YoutubeIE class to use the player_params option or fallback to the default value for android clients (link)
    • Append the player_params option to the query string in the _download_player_responses method of the YoutubeIE class (link)
    • Update the documentation for the youtube extractor in README.md to include the new option (link)

@coletdjnz coletdjnz requested a review from pukkandan July 28, 2023 23:02
@coletdjnz coletdjnz merged commit ba06d77 into yt-dlp:master Jul 29, 2023
@coletdjnz coletdjnz deleted the feat/yt-player-params branch July 29, 2023 06:20
aalsuwaidi pushed a commit to aalsuwaidi/yt-dlp that referenced this pull request Apr 21, 2024
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