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

Missing params payload in Android player request causes "This video is unavailable" response #76

Open
nosoop opened this issue Aug 12, 2024 · 0 comments

Comments

@nosoop
Copy link

nosoop commented Aug 12, 2024

Hi; thanks for developing this library.
As of the current tagged release (v2.1.16), the following code returns a video unavailable response:

import innertube

client = innertube.InnerTube("ANDROID")
data = client.player("dQw4w9WgXcQ")

Based on LuanRT/YouTube.js#624 and comparing the POST body against a known working payload it looks like the current working fix is to add a params field with a base64-encoded protobuf payload CgIQBg== as the value. The code below returns expected results:

import innertube
import innertube.enums

client = innertube.InnerTube("ANDROID")
data = client(
    innertube.enums.Endpoint.PLAYER,
    body={
        "videoId": "dQw4w9WgXcQ",
        "params": "CgIQBg==",
    },
)

I'm not sure where in the call chain would be appropriate to insert this fix and / or modify it for robustness; will leave that up to the author.

kendoodoo referenced this issue in kevinf100/tuberepair.uptimetrackers.com Nov 26, 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

No branches or pull requests

1 participant