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

Requesting video info is broken #130

Open
iexavl opened this issue Sep 25, 2024 · 102 comments
Open

Requesting video info is broken #130

iexavl opened this issue Sep 25, 2024 · 102 comments

Comments

@iexavl
Copy link
Contributor

iexavl commented Sep 25, 2024

The body in parseVideoAndroid function is broken. It gets a faulty response from youtube with no streamData.
I checked pytube and replaced it with this:

        String body =
                "{" +
                "  \"videoId\": \"" + videoId + "\"," +
                "  \"context\": {" +
                "    \"client\": {" +
                "      \"hl\": \"en\"," +
                "      \"gl\": \"US\"," +
                "      \"clientName\": \"ANDROID_MUSIC\"," +
                "      \"clientVersion\": \"5.16.51\"," +
                "      \"androidSdkVersion\": 30" +
                "    }" +
                "  }" +
                "}";

With that it works.

@iexavl
Copy link
Contributor Author

iexavl commented Sep 25, 2024

Never mind. I thought it worked, I was wrong. Also I just noticed that pytube also doesn't work for me. Is this a problem of mine or is it broken for everyone?

@iexavl
Copy link
Contributor Author

iexavl commented Sep 25, 2024

Okay it actually appears to be broken for one particular video? The playability status of that video is 'This video is not available', but it is available in youtube. If I go to the video through the browser it works.

@sealedtx
Copy link
Owner

@iexavl it may require age verification or smth like that, try it in browser without login (incognito tab)

@iexavl
Copy link
Contributor Author

iexavl commented Sep 25, 2024

@iexavl it may require age verification or smth like that, try it in browser without login (incognito tab)

Not age restricted. It's also not only that video, but it's also not every video. It's kind of weird. Originally it was this video:
https://www.youtube.com/watch?v=ZxnD5YrMIgI, but then I found a couple more that don't work

@punkydie
Copy link

punkydie commented Sep 25, 2024

yes the downloader no longer works ): videoInfo is allways null.

@iexavl
Copy link
Contributor Author

iexavl commented Sep 25, 2024

yes the downloader no longer works ): videoInfo is allways null.

It can work by deleting the part that uses innertube, in other words commenting out parseVideoAndroid, but that makes things quite slow since the downloader has to parse the html.

@iexavl
Copy link
Contributor Author

iexavl commented Sep 25, 2024

https://github.com/iv-org/invidious/blob/a021b93063f3956fc9bb3cce0fb56ea252422738/src/invidious/yt_backend/youtube_api.cr#L483
I found this and tried it. The only thing I am missing is serviceIntegrityDimensions, because from what I can tell it's generated. Maybe I will try to add it tomorrow. The error did change a bit, but it's still an error.

@sealedtx
Copy link
Owner

@iexavl have a look at https://github.com/ytdl-org/youtube-dl there might be a recent fix for this that we can implement here

@wiojosjosd
Copy link

@sealedtx can u fix that now?hope soon.

@iexavl
Copy link
Contributor Author

iexavl commented Sep 26, 2024

@iexavl have a look at https://github.com/ytdl-org/youtube-dl there might be a recent fix for this that we can implement here

I looked it over and tried what I could find. Unless I missed something there hasn't been a fix yet. This seems to be something specific to the android client, probably some additional argument. I tried the IOS client and it works:

String body =
                "{" +
                "  "videoId": "" + videoId + ""," +
                "  "context": {" +
                "    "client": {" +
                "      "hl": "en"," +
                "      "gl": "US"," +
                "      "clientName": "IOS"," +
                "      "clientVersion": "17.36.4"," +
               // "      "androidSdkVersion": 30" +
                "    }" +
                "  }" +
                "}";

Unfortunately it seems to be quite constrained for qualities. On 1080p 60fps video I got 720p 30fps max.
I find it slightly odd that I can't see any recent issues on the github page for youtube-dl or any other projects that use the googleapis.

@punkydie
Copy link

but with this i dont have sound

@punkydie
Copy link

bestVideoWithAudioFormat returns zero with the IOS client. I think we need a better solution here.

@punkydie
Copy link

punkydie commented Sep 26, 2024

String body =
"{" +
" "videoId": "" + videoId + ""," +
" "context": {" +
" "client": {" +
" "hl": "en"," +
" "gl": "US"," +
" "clientName": "ANDROID_MUSIC"," +
" "clientVersion": "5.16.51"," +
" "androidSdkVersion": 30" +
" }" +
" }" +
"}";
with this it works

@iexavl
Copy link
Contributor Author

iexavl commented Sep 26, 2024

String body = "{" + " \"videoId\": \"" + videoId + "\"," + " \"context\": {" + " \"client\": {" + " \"hl\": \"en\"," + " \"gl\": \"US\"," + " \"clientName\": \"ANDROID_MUSIC\"," + " \"clientVersion\": \"5.16.51\"," + " \"androidSdkVersion\": 30" + " }" + " }" + "}";

with this it works

It doesn't work for everything. It works for some videos, for others not. And the IOS is indeed a bad option. I have no idea what they did though and I am running out of ideas as to how to find it. Perhaps we should wait for the youtube-dl guys to notice or just post an issue there.

@punkydie
Copy link

and yes you're right unfortunately it doesn't work with every video ):

@punkydie
Copy link

    String body =
            "{" +
            "  \"videoId\": \"" + videoId + "\"," +
            "  \"context\": {" +
            "    \"client\": {" +
            "      \"hl\": \"en\"," +
            "      \"gl\": \"US\"," +
            "      \"clientName\": \"ANDROID_CREATOR\"," +
            "      \"clientVersion\": \"22.36.102\"," +
            "      \"androidSdkVersion\": 30 " +
            "    }" +
            "  }" +
            "}";

this works very good and fast and with all videos too that doesnt worked with ANDROID_MUSIC

@punkydie
Copy link

ANDROID_TV
2.19.1.303051424

can use up to 1080p 60FPS and works too

@sealedtx
Copy link
Owner

sealedtx commented Sep 27, 2024

@punkydie can you play a bit with these params and find best one, which works with most of videos, it should cover most of Itags

Then I'll update code or you can submit a pull request if you'd like to be a contributor. Thank you

@punkydie
Copy link

It might not be bad if the downloader checks all clients in a loop from good to bad until the video works. For example, ANDROID_VR also works, which supports up to 2160p and 60FPS. But not for every video. But it would be a shame to do without it.

@iexavl
Copy link
Contributor Author

iexavl commented Sep 27, 2024

https://github.com/zerodytrash/YouTube-Internal-Clients?tab=readme-ov-file#clients
Check this out. ANDROID_TV indeed seems to be 1080p60. It should do the job at least until the ANDROID client works. I tested it on the previous videos that were broken and it worked.

@iexavl
Copy link
Contributor Author

iexavl commented Sep 27, 2024

@punkydie can you play a bit with these params and find best one, which works with most of videos, it should cover most of Itags

Then I'll update code or you can submit a pull request if you'd like to be a contributor. Thank you

Nevermind. Just use the web client.
Here :

        String body =
                "{" +
                "  \"videoId\": \"" + videoId + "\"," +
                "  \"context\": {" +
                "    \"client\": {" +
                "      \"hl\": \"en\"," +
                "      \"gl\": \"US\"," +
                "      \"clientName\": \"WEB\"," +
                "      \"clientVersion\": \"2.20220918\"," +
                "    }" +
                "  }" +
                "}";

It works and it's 4320p60 HDR, same as android.

@punkydie
Copy link

punkydie commented Sep 27, 2024

nope doesnt work on me ANDROID_TV works best with all Videos that i have tested and very fast

@iexavl
Copy link
Contributor Author

iexavl commented Sep 27, 2024

nope doesnt work on me ANDROID_TV works best with all Videos that i have tested and very fast

Seriously? I guess the android clients are the most sensible. Although I suppose we can take a look at the other clients. Can you check out the other clients in the list and see if they work for you?

@punkydie
Copy link

Yes, just test it. Works perfectly. Haven't found a video yet that doesn't work.

@iexavl
Copy link
Contributor Author

iexavl commented Sep 27, 2024

Yes, just test it. Works perfectly. Haven't found a video yet that doesn't work.

can you try MWEB (2.20220918) , TVHTML5 (7.20220918) , TVHTML5_CAST (1.1), WEB_EMBEDDED_PLAYER (9.20220918), WEB_CREATOR (1.20220918) for now?

@punkydie
Copy link

yes i can

@punkydie
Copy link

The WEB Clients doesnt work. and TVHTML Clients not on all Videos.

@iexavl
Copy link
Contributor Author

iexavl commented Sep 27, 2024

The WEB Clients doesnt work. and TVHTML Clients not on all Videos.

this is some really odd stuff. I guess we will be walking on eggshells with these clients until someone finds out what's going on. This also means that my assumption that the problem was only in android clients was wrong.

@punkydie
Copy link

Yes, I build into my mod (Minecraft) that I can change the clients if necessary without always having to do that in the code.

@iexavl
Copy link
Contributor Author

iexavl commented Sep 27, 2024

Maybe it would be better to have multiple clients and have the requests be retried in case one client fails to return the streamingData @sealedtx

@iexavl
Copy link
Contributor Author

iexavl commented Oct 22, 2024

yt-dlp/yt-dlp@de20627#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5R1774

@iexavl yt-dlp now uses ios client as default:

'ios': {
       'INNERTUBE_CONTEXT': {
           'client': {
               'clientName': 'IOS',
               'clientVersion': '19.29.1',
               'deviceMake': 'Apple',
               'deviceModel': 'iPhone16,2',
               'userAgent': 'com.google.ios.youtube/19.29.1 (iPhone16,2; U; CPU iOS 17_5_1 like Mac OS X;)',
               'osName': 'iPhone',
               'osVersion': '17.5.1.21F90',
           },
       },
       'INNERTUBE_CONTEXT_CLIENT_NAME': 5,
       'REQUIRE_JS_PLAYER': False,
   }

Well unfortunately (and I just tested it) that means yt-dlp is just as broken as our interpretation of it.
@notarom if it works for you, you should be able to get the same result you got with yt-dlp by setting your request's clientType to IOS like so:
RequestVideoInfo info = new RequestVideoInfo("something").clientType(ClientType.IOS);

This client still can't do it all though so we will have to fix the web clients.

@pH-Valiu
Copy link

Since Youtube is apparently doing big changes to its WebRequest handling, maybe we will have to start looking for an alternative approach to download media?
An idea that came to my mind, was to simultaneously issue multiple requests to the same media but all of them spaced apart by like five seconds of media runtime. So that each request records 5 seconds of the media and then afterwards it is all getting put together again?
What do you think of this idea?

@sealedtx
Copy link
Owner

Since Youtube is apparently doing big changes to its WebRequest handling, maybe we will have to start looking for an alternative approach to download media? An idea that came to my mind, was to simultaneously issue multiple requests to the same media but all of them spaced apart by like five seconds of media runtime. So that each request records 5 seconds of the media and then afterwards it is all getting put together again? What do you think of this idea?

I didn't get your idea. What is the benefit of this? Which request to send? To merge media we'll need extra dependency like ffmpeg

@notarom
Copy link

notarom commented Oct 23, 2024

@iexavl You're right. It's the same for me. I noticed I didn't even need to set a client after I updated JYD code to the latest. The only little issue is that it may not get the highest quality video. Seems Youtube may be doing that intentionally. After monitoring network requests, I noticed that yt-dlp starts with the IOS client, then MWEB client and then it makes a third request to a hls endpoint. It seems the third is the only sure way to get the highest possible quality. Unfortunately, the last method will require an external dependency like ffmpeg to recombine the split video parts from the m3u8 file. As far as I'm concerned the current update works well for me, so great job so far!

@pH-Valiu
Copy link

pH-Valiu commented Oct 24, 2024

I didn't get your idea. What is the benefit of this? Which request to send? To merge media we'll need extra dependency like ffmpeg

What request exactly I do not know. Mabye replicating the requests issued by the browser youtube when opening a video. I think you can set the media offset in the URL. And yes that would require ffmpeg. Like yt-dlp is doing to receive the highest quality medias as described by @notarom . But if zero dependency is mandatory, I see that this idea can not work.

@iexavl
Copy link
Contributor Author

iexavl commented Oct 24, 2024

I didn't get your idea. What is the benefit of this? Which request to send? To merge media we'll need extra dependency like ffmpeg

What request exactly I do not know. Mabye replicating the requests issued by the browser youtube when opening a video. I think you can set the media offset in the URL. And yes that would require ffmpeg. Like yt-dlp is doing to receive the highest quality medias as described by @notarom . But if zero dependency is mandatory, I see that this idea can not work.

The problem isn't the processing of the video. The problem is receiving a response from the servers at all. At the moment with pretty much all the web clients when you send a request for video info the server responds, but when you try to send a request to a link the server responded with, that returns a 403 response.
@notarom the reason you might see lower qualities is because of the client itself. Some clients are more constrained for qualities than others.
https://github.com/zerodytrash/YouTube-Internal-Clients?tab=readme-ov-file#clients
Here is a comprehensive list of yt's clients and their qualities. Take it with a grain of salt as it is subject to change at any moment and it's likely that it's not completely accurate even right now, but more or less at least.

@punkydie
Copy link

So the great era is over now, is it?

@iexavl
Copy link
Contributor Author

iexavl commented Oct 29, 2024

So the great era is over now, is it?

well it's pretty mysterious. I did some testing and got curious as to why some clients work and others don't for the same video and same format and I narrowed it down to these parameters in the request :
lsig, sig, sparams, met, id, ei, expire.
These parameters seem to be the ones that really matter as when they are replaced in the url of a response of a non-working client with the ones taken from a working client, the server doesn't give you a 403. In any case for this someone has to do a dive back into youtube's heavily obfuscated code which is always fun. It should be perfectly fixable one way or another, but there's no telling how long it will take.

@punkydie
Copy link

sounds exciting. I'm curious to see if it will really work again at some point. Thanks for your work!

@punkydie
Copy link

So at the moment it's working halfway again. What I have noticed is that with many clients the video is not displayed even though all data such as author, title, FPS etc. are found. What could be the reason for this?

@iexavl
Copy link
Contributor Author

iexavl commented Nov 18, 2024

punkydie

honestly I haven't touched this since the last time we commented. I've been on a bit of a burnout strike. The issue is the same that was experienced with the web clients, I am guessing they are also updating other clients.

@punkydie
Copy link

Hmm yes it's just strange that all the data arrives but the video doesn't play. At first I thought it might be due to some itags, but playing around with them didn't help either.

@punkydie
Copy link

And have a good time Health comes first!

@iexavl
Copy link
Contributor Author

iexavl commented Nov 18, 2024

Hmm yes it's just strange that all the data arrives but the video doesn't play. At first I thought it might be due to some itags, but playing around with them didn't help either.

well it's the exact issue we are currently trying to solve. Kind of unfortunate that other clients are also getting it so soon.

@punkydie
Copy link

No, the situation has improved again. Many clients are now working again. You just have to use different clients for different videos - that's not a problem, I've automated it for myself. But there is no way for me to query if the video is not played then please search for the next client. Because video info is then no longer null if it has the rest.

@iexavl
Copy link
Contributor Author

iexavl commented Nov 18, 2024

No, the situation has improved again. Many clients are now working again. You just have to use different clients for different videos - that's not a problem, I've automated it for myself. But there is no way for me to query if the video is not played then please search for the next client. Because video info is then no longer null if it has the rest.

I suppose the only practical solution for now would probably be just to check the response. If it returns a code 403 that means access denied, so the client won't respond to you even if you did get your hands on the video info, which means you should try a different client.

@punkydie
Copy link

really annoying with youtube. once again it feels like no clients are working today.

@punkydie
Copy link

reason=This video is unavailable, contextParams=Q0FFU0FnZ0I=, skip={playabilityErrorSkipConfig={skipOnPlayabilityError=false}}, status=ERROR, errorScreen={playerErrorMessageRenderer={reason={runs=[{text=The following content is not available on this app.}]}, thumbnail={thumbnails=[{width=140, url=//s.ytimg.com/yts/img/meh7-vflGevej7.png, height=100}, {width=140, url=//s.ytimg.com/yts/img/meh7-vflGevej7.png, height=100}]}, learnMore={runs=[{text=Learn more, navigationEndpoint={clickTrackingParams=CAAQu2kiEwiF1oPrw5-LAxXkWXoFHYhuC2Y=, urlEndpoint={url=//support.google.com/youtube/answer/12318250?hl=en, target=TARGET_NEW_WINDOW}}}]}, icon={iconType=ERROR_OUTLINE}, subreason={runs=[{text=Watch on the latest version of YouTube., navigationEndpoint={clickTrackingParams=CAAQu2kiEwiF1oPrw5-LAxXkWXoFHYhuC2Y=, urlEndpoint={url=market://details?id=com.google.android.youtube&url=https%3A%2F%Fwww.youtube.com%2Fwatch%3Fv%3DWues0vMU63A, target=TARGET_NEW_WINDOW}}}]}}}} reason=Sign in to confirm you’re not a bot, contextParams=Q0FFU0FnZ0I=, skip={playabilityErrorSkipConfig={skipOnPlayabilityError=false}}, status=LOGIN_REQUIRED, errorScreen={playerErrorMessageRenderer={reason={runs=[{text=Sign in to confirm you’re not a bot}]}, thumbnail={thumbnails=[{width=140, url=//s.ytimg.com/yts/img/meh7-vflGevej7.png, height=100}]}, icon={iconType=ERROR_OUTLINE}, subreason={runs=[{text=This helps protect our community. }, {text=Learn more, navigationEndpoint={clickTrackingParams=CAAQu2kiEwiAqozrw5-LAxVwXXoFHQk2Ki8=, urlEndpoint={url=https://support.google.com/youtube/answer/3037019#zippy=%2Ccheck-that-youre-signed-into-youtube}}}]}, proceedButton={buttonRenderer={trackingParams=CAEQptEGIhMIgKqM68OfiwMVcF16BR0JNiov, size=SIZE_DEFAULT, style=STYLE_PRIMARY, isDisabled=false, text={simpleText=Sign in}, navigationEndpoint={clickTrackingParams=CAEQptEGIhMIgKqM68OfiwMVcF16BR0JNiov, signInEndpoint={nextEndpoint={clickTrackingParams=CAEQptEGIhMIgKqM68OfiwMVcF16BR0JNiov, urlEndpoint={url=}}}}}}}}} reason=Sign in to confirm you’re not a bot, contextParams=Q0FFU0FnZ0I=, skip={playabilityErrorSkipConfig={skipOnPlayabilityError=false}}, status=LOGIN_REQUIRED, errorScreen={playerErrorMessageRenderer={reason={simpleText=Sign in to confirm you’re not a bot}, thumbnail={thumbnails=[{width=140, url=//s.ytimg.com/yts/img/meh7-vflGevej7.png, height=100}]}, icon={iconType=ERROR_OUTLINE}, subreason={runs=[{text=This helps protect our community. }, {text=Learn more, navigationEndpoint={clickTrackingParams=CAAQu2kiEwjykZXrw5-LAxV4ZHoFHQuJJC4=, urlEndpoint={url=https://support.google.com/youtube/answer/3037019#zippy=%2Ccheck-that-youre-signed-into-youtube}}}]}, proceedButton={buttonRenderer={trackingParams=CAEQptEGIhMI8pGV68OfiwMVeGR6BR0LiSQu, isDisabled=false, text={simpleText=Sign in}, navigationEndpoint={clickTrackingParams=CAEQptEGIhMI8pGV68OfiwMVeGR6BR0LiSQu, signInEndpoint={hack=true}}}}}}} reason=YouTube is no longer supported in this application or device., status=ERROR} reason=YouTube is no longer supported in this application or device., status=ERROR} reason=This video is unavailable, status=ERROR} reason=This video is unavailable, status=ERROR} reason=Please sign in, contextParams=Q0FFU0FnZ0I=, skip={playabilityErrorSkipConfig={skipOnPlayabilityError=false}}, status=LOGIN_REQUIRED} reason=Please sign in, contextParams=Q0FFU0FnZ0I=, skip={playabilityErrorSkipConfig={skipOnPlayabilityError=false}}, status=LOGIN_REQUIRED} reason=Sign in to confirm you’re not a bot, contextParams=Q0FFU0FnZ0I=, status=LOGIN_REQUIRED} reason=Please sign in, status=LOGIN_REQUIRED, errorScreen={playerErrorMessageRenderer={reason={runs=[{text=Please sign in}]}, thumbnail={thumbnails=[{width=140, url=//s.ytimg.com/yts/img/meh7-vflGevej7.png, height=100}]}, icon={iconType=ERROR_OUTLINE}, subreason={runs=[{text=Sign in to save videos, subscribe, and more}]}, proceedButton={buttonRenderer={trackingParams=CAEQptEGIhMIw9r168OfiwMVmlp6BR0JKB8z, isDisabled=false, text={simpleText=Sign in}, navigationEndpoint={clickTrackingParams=CAEQptEGIhMIw9r168OfiwMVmlp6BR0JKB8z, signInEndpoint={nextEndpoint={clickTrackingParams=CAEQptEGIhMIw9r168OfiwMVmlp6BR0JKB8z, urlEndpoint={url=}}}}}}}}} reason=This video is not available, status=UNPLAYABLE} reason=Please sign in, status=LOGIN_REQUIRED, errorScreen={playerErrorMessageRenderer={reason={runs=[{text=Please sign in}]}, thumbnail={thumbnails=[{width=140, url=//s.ytimg.com/yts/img/meh7-vflGevej7.png, height=100}]}, subreason={runs=[{text=Sign in to save videos, subscribe, and more}]}, proceedButton={buttonRenderer={trackingParams=CAEQptEGIhMIlZ2I7MOfiwMV7HJ6BR2zCxaR, isDisabled=false, text={simpleText=Sign in}, navigationEndpoint={clickTrackingParams=CAEQptEGIhMIlZ2I7MOfiwMV7HJ6BR2zCxaR, signInEndpoint={nextEndpoint={clickTrackingParams=CAEQptEGIhMIlZ2I7MOfiwMV7HJ6BR2zCxaR, urlEndpoint={url=}}}}}}}}} reason=YouTube is no longer supported in this application or device., status=ERROR} reason=Please sign in, status=UNPLAYABLE} reason=This video is not available, status=UNPLAYABLE} reason=Please sign in, status=UNPLAYABLE, errorScreen={playerErrorMessageRenderer={reason={simpleText=Please sign in}, thumbnail={thumbnails=[{width=140, url=//s.ytimg.com/yts/img/meh7-vflGevej7.png, height=100}]}}}} reason=Sign in to confirm you’re not a bot, status=UNPLAYABLE} reason=YouTube is no longer supported in this application or device., status=ERROR} reason=Please sign in, status=UNPLAYABLE} These are the answers I get from all clients. No client is working at the moment, is it?

@pH-Valiu
Copy link

Same for me. Tried it but (at least standard client) not working

@iexavl
Copy link
Contributor Author

iexavl commented Jan 31, 2025

reason=This video is unavailable, contextParams=Q0FFU0FnZ0I=, skip={playabilityErrorSkipConfig={skipOnPlayabilityError=false}}, status=ERROR, errorScreen={playerErrorMessageRenderer={reason={runs=[{text=The following content is not available on this app.}]}, thumbnail={thumbnails=[{width=140, url=//s.ytimg.com/yts/img/meh7-vflGevej7.png, height=100}, {width=140, url=//s.ytimg.com/yts/img/meh7-vflGevej7.png, height=100}]}, learnMore={runs=[{text=Learn more, navigationEndpoint={clickTrackingParams=CAAQu2kiEwiF1oPrw5-LAxXkWXoFHYhuC2Y=, urlEndpoint={url=//support.google.com/youtube/answer/12318250?hl=en, target=TARGET_NEW_WINDOW}}}]}, icon={iconType=ERROR_OUTLINE}, subreason={runs=[{text=Watch on the latest version of YouTube., navigationEndpoint={clickTrackingParams=CAAQu2kiEwiF1oPrw5-LAxXkWXoFHYhuC2Y=, urlEndpoint={url=market://details?id=com.google.android.youtube&url=https%3A%2F%Fwww.youtube.com%2Fwatch%3Fv%3DWues0vMU63A, target=TARGET_NEW_WINDOW}}}]}}}} reason=Sign in to confirm you’re not a bot, contextParams=Q0FFU0FnZ0I=, skip={playabilityErrorSkipConfig={skipOnPlayabilityError=false}}, status=LOGIN_REQUIRED, errorScreen={playerErrorMessageRenderer={reason={runs=[{text=Sign in to confirm you’re not a bot}]}, thumbnail={thumbnails=[{width=140, url=//s.ytimg.com/yts/img/meh7-vflGevej7.png, height=100}]}, icon={iconType=ERROR_OUTLINE}, subreason={runs=[{text=This helps protect our community. }, {text=Learn more, navigationEndpoint={clickTrackingParams=CAAQu2kiEwiAqozrw5-LAxVwXXoFHQk2Ki8=, urlEndpoint={url=https://support.google.com/youtube/answer/3037019#zippy=%2Ccheck-that-youre-signed-into-youtube}}}]}, proceedButton={buttonRenderer={trackingParams=CAEQptEGIhMIgKqM68OfiwMVcF16BR0JNiov, size=SIZE_DEFAULT, style=STYLE_PRIMARY, isDisabled=false, text={simpleText=Sign in}, navigationEndpoint={clickTrackingParams=CAEQptEGIhMIgKqM68OfiwMVcF16BR0JNiov, signInEndpoint={nextEndpoint={clickTrackingParams=CAEQptEGIhMIgKqM68OfiwMVcF16BR0JNiov, urlEndpoint={url=}}}}}}}}} reason=Sign in to confirm you’re not a bot, contextParams=Q0FFU0FnZ0I=, skip={playabilityErrorSkipConfig={skipOnPlayabilityError=false}}, status=LOGIN_REQUIRED, errorScreen={playerErrorMessageRenderer={reason={simpleText=Sign in to confirm you’re not a bot}, thumbnail={thumbnails=[{width=140, url=//s.ytimg.com/yts/img/meh7-vflGevej7.png, height=100}]}, icon={iconType=ERROR_OUTLINE}, subreason={runs=[{text=This helps protect our community. }, {text=Learn more, navigationEndpoint={clickTrackingParams=CAAQu2kiEwjykZXrw5-LAxV4ZHoFHQuJJC4=, urlEndpoint={url=https://support.google.com/youtube/answer/3037019#zippy=%2Ccheck-that-youre-signed-into-youtube}}}]}, proceedButton={buttonRenderer={trackingParams=CAEQptEGIhMI8pGV68OfiwMVeGR6BR0LiSQu, isDisabled=false, text={simpleText=Sign in}, navigationEndpoint={clickTrackingParams=CAEQptEGIhMI8pGV68OfiwMVeGR6BR0LiSQu, signInEndpoint={hack=true}}}}}}} reason=YouTube is no longer supported in this application or device., status=ERROR} reason=YouTube is no longer supported in this application or device., status=ERROR} reason=This video is unavailable, status=ERROR} reason=This video is unavailable, status=ERROR} reason=Please sign in, contextParams=Q0FFU0FnZ0I=, skip={playabilityErrorSkipConfig={skipOnPlayabilityError=false}}, status=LOGIN_REQUIRED} reason=Please sign in, contextParams=Q0FFU0FnZ0I=, skip={playabilityErrorSkipConfig={skipOnPlayabilityError=false}}, status=LOGIN_REQUIRED} reason=Sign in to confirm you’re not a bot, contextParams=Q0FFU0FnZ0I=, status=LOGIN_REQUIRED} reason=Please sign in, status=LOGIN_REQUIRED, errorScreen={playerErrorMessageRenderer={reason={runs=[{text=Please sign in}]}, thumbnail={thumbnails=[{width=140, url=//s.ytimg.com/yts/img/meh7-vflGevej7.png, height=100}]}, icon={iconType=ERROR_OUTLINE}, subreason={runs=[{text=Sign in to save videos, subscribe, and more}]}, proceedButton={buttonRenderer={trackingParams=CAEQptEGIhMIw9r168OfiwMVmlp6BR0JKB8z, isDisabled=false, text={simpleText=Sign in}, navigationEndpoint={clickTrackingParams=CAEQptEGIhMIw9r168OfiwMVmlp6BR0JKB8z, signInEndpoint={nextEndpoint={clickTrackingParams=CAEQptEGIhMIw9r168OfiwMVmlp6BR0JKB8z, urlEndpoint={url=}}}}}}}}} reason=This video is not available, status=UNPLAYABLE} reason=Please sign in, status=LOGIN_REQUIRED, errorScreen={playerErrorMessageRenderer={reason={runs=[{text=Please sign in}]}, thumbnail={thumbnails=[{width=140, url=//s.ytimg.com/yts/img/meh7-vflGevej7.png, height=100}]}, subreason={runs=[{text=Sign in to save videos, subscribe, and more}]}, proceedButton={buttonRenderer={trackingParams=CAEQptEGIhMIlZ2I7MOfiwMV7HJ6BR2zCxaR, isDisabled=false, text={simpleText=Sign in}, navigationEndpoint={clickTrackingParams=CAEQptEGIhMIlZ2I7MOfiwMV7HJ6BR2zCxaR, signInEndpoint={nextEndpoint={clickTrackingParams=CAEQptEGIhMIlZ2I7MOfiwMV7HJ6BR2zCxaR, urlEndpoint={url=}}}}}}}}} reason=YouTube is no longer supported in this application or device., status=ERROR} reason=Please sign in, status=UNPLAYABLE} reason=This video is not available, status=UNPLAYABLE} reason=Please sign in, status=UNPLAYABLE, errorScreen={playerErrorMessageRenderer={reason={simpleText=Please sign in}, thumbnail={thumbnails=[{width=140, url=//s.ytimg.com/yts/img/meh7-vflGevej7.png, height=100}]}}}} reason=Sign in to confirm you’re not a bot, status=UNPLAYABLE} reason=YouTube is no longer supported in this application or device., status=ERROR} reason=Please sign in, status=UNPLAYABLE} These are the answers I get from all clients. No client is working at the moment, is it?

look at #144 (comment)
and #144 (comment)

@pH-Valiu

@punkydie
Copy link

yes, and what's the point? doesn't it still work?

@iexavl
Copy link
Contributor Author

iexavl commented Jan 31, 2025

yes, and what's the point? doesn't it still work?

Doesn't what still work? If you are referring to the clients for the most part yes, but it seems like a lot of the requests get flagged as being sent by bots. I managed to get an ok by using the po_token and visitor_data

@punkydie
Copy link

punkydie commented Feb 1, 2025

Yes, that's true, but there are a few videos that still don't work. Still, better than nothing for now. Thank you

@punkydie
Copy link

punkydie commented Feb 2, 2025

{playableInEmbed=true, contextParams=Q0FJU0FnZ0I=, miniplayer={miniplayerRenderer={playbackMode=PLAYBACK_MODE_PAUSED_ONLY, minimizedEndpoint={openPopupAction={popupType=TOAST, popup={notificationActionRenderer={trackingParams=CAsQuWoiEwiP1_-n8qSLAxUo40IFHdGpABA=, responseText={simpleText=Miniplayer is off for videos made for kids. Tap play to resume}, actionButton={buttonRenderer={trackingParams=CAwQ8FsiEwiP1_-n8qSLAxUo40IFHdGpABA=, text={simpleText=Learn more}, command={commandMetadata={webCommandMetadata={rootVe=83769, webPageType=WEB_PAGE_TYPE_UNKNOWN, url=//support.google.com/youtube/bin/answer.py?answer=9632097&nohelpkit=1&hl=en}}, clickTrackingParams=CAwQ8FsiEwiP1_-n8qSLAxUo40IFHdGpABA=, urlEndpoint={url=//support.google.com/youtube/bin/answer.py?answer=9632097&nohelpkit=1&hl=en, target=TARGET_NEW_WINDOW}}}}}}}, clickTrackingParams=CAAQu2kiEwiP1_-n8qSLAxUo40IFHdGpABA=}}}, status=OK}

Status is OK but no Video this is happen on some videos even with po_token

I get all Infos like Autor and Title but no Video or Sound

this is the video: https://www.youtube.com/watch?v=89xEbfo8o4U

@iexavl
Copy link
Contributor Author

iexavl commented Feb 4, 2025

{playableInEmbed=true, contextParams=Q0FJU0FnZ0I=, miniplayer={miniplayerRenderer={playbackMode=PLAYBACK_MODE_PAUSED_ONLY, minimizedEndpoint={openPopupAction={popupType=TOAST, popup={notificationActionRenderer={trackingParams=CAsQuWoiEwiP1_-n8qSLAxUo40IFHdGpABA=, responseText={simpleText=Miniplayer is off for videos made for kids. Tap play to resume}, actionButton={buttonRenderer={trackingParams=CAwQ8FsiEwiP1_-n8qSLAxUo40IFHdGpABA=, text={simpleText=Learn more}, command={commandMetadata={webCommandMetadata={rootVe=83769, webPageType=WEB_PAGE_TYPE_UNKNOWN, url=//support.google.com/youtube/bin/answer.py?answer=9632097&nohelpkit=1&hl=en}}, clickTrackingParams=CAwQ8FsiEwiP1_-n8qSLAxUo40IFHdGpABA=, urlEndpoint={url=//support.google.com/youtube/bin/answer.py?answer=9632097&nohelpkit=1&hl=en, target=TARGET_NEW_WINDOW}}}}}}}, clickTrackingParams=CAAQu2kiEwiP1_-n8qSLAxUo40IFHdGpABA=}}}, status=OK}

Status is OK but no Video this is happen on some videos even with po_token

I get all Infos like Autor and Title but no Video or Sound

this is the video: https://www.youtube.com/watch?v=89xEbfo8o4U

Are you talking about getting a response with the format data? Because I managed to get that with a bunch of clients like WEB, MWEB, WEB_HEROES ... or are you talking about an HTTP 403 when you try to open the stream to the format or?

@iexavl
Copy link
Contributor Author

iexavl commented Feb 4, 2025

{playableInEmbed=true, contextParams=Q0FJU0FnZ0I=, miniplayer={miniplayerRenderer={playbackMode=PLAYBACK_MODE_PAUSED_ONLY, minimizedEndpoint={openPopupAction={popupType=TOAST, popup={notificationActionRenderer={trackingParams=CAsQuWoiEwiP1_-n8qSLAxUo40IFHdGpABA=, responseText={simpleText=Miniplayer is off for videos made for kids. Tap play to resume}, actionButton={buttonRenderer={trackingParams=CAwQ8FsiEwiP1_-n8qSLAxUo40IFHdGpABA=, text={simpleText=Learn more}, command={commandMetadata={webCommandMetadata={rootVe=83769, webPageType=WEB_PAGE_TYPE_UNKNOWN, url=//support.google.com/youtube/bin/answer.py?answer=9632097&nohelpkit=1&hl=en}}, clickTrackingParams=CAwQ8FsiEwiP1_-n8qSLAxUo40IFHdGpABA=, urlEndpoint={url=//support.google.com/youtube/bin/answer.py?answer=9632097&nohelpkit=1&hl=en, target=TARGET_NEW_WINDOW}}}}}}}, clickTrackingParams=CAAQu2kiEwiP1_-n8qSLAxUo40IFHdGpABA=}}}, status=OK}
Status is OK but no Video this is happen on some videos even with po_token
I get all Infos like Autor and Title but no Video or Sound
this is the video: https://www.youtube.com/watch?v=89xEbfo8o4U

Are you talking about getting a response with the format data? Because I managed to get that with a bunch of clients like WEB, MWEB, WEB_HEROES ... or are you talking about an HTTP 403 when you try to open the stream to the url or?

@punkydie
Copy link

punkydie commented Feb 4, 2025

yes the title and author is displayed but no video what error message comes up I don't know. But video info is not null but still no video

@iexavl
Copy link
Contributor Author

iexavl commented Feb 4, 2025

yes the title and author is displayed but no video what error message comes up I don't know. But video info is not null but still no video

yeah, that video id returns a 403. Not quite sure why that happens for some videos to be honest.

@punkydie
Copy link

punkydie commented Feb 4, 2025

Maybe we'll find out at some point :)

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

7 participants