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

Locale parameter doesn't work #75

Open
kms0219kms opened this issue Jul 27, 2024 · 0 comments
Open

Locale parameter doesn't work #75

kms0219kms opened this issue Jul 27, 2024 · 0 comments

Comments

@kms0219kms
Copy link

kms0219kms commented Jul 27, 2024

Problem

A request was sent using the following locale parameters:

yt = InnerTube(client_name="WEB", locale=Locale(hl="ko-KR", gl="ko"))

But the result is still in English.

Solution

As far as I know, hl and gl should also be passed in the context of the request body, like this:
image

So we need to add hl and gl parameters to the models.py -> contextualize function to make the locale parameter work.

Notes

However, the format of the Accept Language header is "xx-XX,xx;q=0.5", but the format of the context parameter is 'xx' for hl and 'XX' for gl.
We need to think about how to apply both to the models.py -> Locale class.

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

No branches or pull requests

1 participant