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.
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:
With that it works.