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

"The following content is not available on this app." errors #63

Open
glubsy opened this issue Apr 16, 2023 · 8 comments
Open

"The following content is not available on this app." errors #63

glubsy opened this issue Apr 16, 2023 · 8 comments
Assignees
Labels
bug Something isn't working

Comments

@glubsy
Copy link
Owner

glubsy commented Apr 16, 2023

Recently these errors, along with 403 forbidden errors, started appearing more and more, sometimes at random during download.

Have to find a way to handle these. Sending up to date client version in POST requests might not be quite enough.

Other mentions of this: iv-org/invidious#3230 TeamNewPipe/NewPipe#8713

@glubsy glubsy added the bug Something isn't working label Apr 16, 2023
@glubsy glubsy self-assigned this Apr 16, 2023
@ghost
Copy link

ghost commented Apr 18, 2023

If it helps, I did some research on this here:

https://github.com/4cq2/mech/blob/v1.3.8/youtube/params.md

not sure if its exactly the same issue, but might be helpful.

@hbbernardo
Copy link

Is there any update on this issue? I left running livestream_saver on my remote machine for a while and only today I realized that nothing was being actually saved.

I'm getting this error:

  • CRITICAL - download.-Th9Fq7pYl4 - Missing streamingData key in json!
    2023-05-11 18:02:09,111 - WARNING - download.-Th9Fq7pYl4 - Error acessing title from player_response: 'videoDetails'
    2023-05-11 18:02:09,111 - WARNING - download.-Th9Fq7pYl4 - Error fetching description from player_response: 'videoDetails'
    2023-05-11 18:02:09,111 - WARNING - download.-Th9Fq7pYl4 - Error fetching description from player_response: 'videoDetails'
    2023-05-11 18:02:09,111 - WARNING - download.-Th9Fq7pYl4 - An output directory already existed. We assume a failed download attempt. Last segment available was 1.
    2023-05-11 18:02:09,111 - INFO - download.-Th9Fq7pYl4 - Will start downloading from segment number 0.
    2023-05-11 18:02:09,176 - INFO - download.-Th9Fq7pYl4 - Stream seems to be viewed live. Good.
    2023-05-11 18:02:09,176 - WARNING - download.-Th9Fq7pYl4 - Livestream -Th9Fq7pYl4 playability status is: ERROR Reason: This video is unavailable. Sub-reason: Watch on the latest version of YouTube.. Error reason: The following content is not available on this app..
    2023-05-11 18:02:09,176 - WARNING - download.-Th9Fq7pYl4 - Outdated client error. Retrying shortly...
    2023-05-11 18:02:09,177 - INFO - livestream_saver.util - Sleeping for 5.36 minutes (321.54 seconds)...

@ghost
Copy link

ghost commented May 11, 2023

if it helps, I am using request like this now:

POST /youtubei/v1/player HTTP/1.1
Host: www.youtube.com
User-Agent: com.google.android.youtube/18.20.99

{
 "context": {
  "client": {
   "androidSdkVersion": 99,
   "clientName": "ANDROID",
   "clientVersion": "18.20.99"
  }
 },
 "videoId": "-Th9Fq7pYl4"
}

@hbbernardo
Copy link

hbbernardo commented May 11, 2023

if it helps, I am using request like this now:

POST /youtubei/v1/player HTTP/1.1
Host: www.youtube.com
User-Agent: com.google.android.youtube/18.20.99

{
 "context": {
  "client": {
   "androidSdkVersion": 99,
   "clientName": "ANDROID",
   "clientVersion": "18.20.99"
  }
 },
 "videoId": "-Th9Fq7pYl4"
}

Where should I edit this request?

Is there a specific file?

@glubsy
Copy link
Owner Author

glubsy commented May 11, 2023

@4cq2 thanks for chiming in and sharing your knowledge, I'm keeping an eye on your findings.
That updated client version seems to work. Will be using it for the time being, thanks.

@hbbernardo you can try the latest commit, but be warned that you will still get HTTP Error 403: Forbidden when trying to download segments.
I am still investigating potential solutions but I might end up using yt-dlp to download streams if I stay stuck for too long (I have already started importing their codebase for client selection).

If you are in a hurry, I suggest using yt-dlp instead (you could have it loop on a channel with the following command for example:

while true; do yt-dlp --fragment-retries 50 -o '%(upload_date)s [%(uploader)s] %(title)s [%(height)s][%(id)s].%(ext)s' -ciw -f '133+140/134+140/mp4+m4a/bestvideo+bestaudio' --add-metadata --embed-thumbnail  --live-from-start --match-filter 'is_live' https://www.youtube.com/chanel_name_or_id/live; sleep $((5*60)); done

Edit: as of 2023/07/20, the /live tab does not return the current livestream consistently.

@ghost
Copy link

ghost commented May 11, 2023

if someone can detail an example video thats failing I can look into it. Generally I am not interested in live videos, so I cant promise I will be interested to help if thats the case.

@glubsy
Copy link
Owner Author

glubsy commented May 11, 2023

@4cq2 all live videos fail to download right now. But don't worry about it, especially if you're not interested in live videos. There are other tools out there like yt-dlp that still work. It's probably just a matter of computing the cipher signature properly.

@ghost
Copy link

ghost commented May 11, 2023

ah OK if it only impacts live video, then I will let someone else handle the issue. if any non-live videos are impacted, I am happy to help

glubsy added a commit that referenced this issue Jul 20, 2023
This is a temporary workaround to paliate the broken download as
mentioned in #63
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants