hama3254 / Crunchyroll-Downloader-v3.0

Downloader for Crunchyroll
850 stars 109 forks source link

Error 403 #959

Closed TaMaGo-TTV closed 1 month ago

TaMaGo-TTV commented 1 month ago

image Am i the only one?

0151Master commented 1 month ago

Same for me, Crunchy probably changed something

TaMaGo-TTV commented 1 month ago

Same for me, Crunchy probably changed something

Big F

we get more information tomorow, I guess. Its 1am in germany.

napgiver commented 1 month ago

Same here.

kuriidev commented 1 month ago

Captura de pantalla 2024-05-21 170821

Flame-Rider commented 1 month ago

Glad to see that i am not the only one with this problem i hope it is fixed soon

Daigh commented 1 month ago

Same problem to me :(

hama3254 commented 1 month ago

It seems like they changes the API again. I am not sure righ now if (or what) i can do about it. It also may take some days for me to take a proper look at this. grafik

stratuma commented 1 month ago

@hama3254 just add 'User-Agent': 'Crunchyroll/1.8.0 Nintendo Switch/12.3.12.0 UE4/4.27' to the playlist fetch

drunknmonkie commented 1 month ago

@Elwador thank you

hama3254 commented 1 month ago

v3.23.3 with the suggested fix from @stratuma is available and worked with my (limited) testing.

acteiaa commented 1 month ago

image I downloaded 6 videos and it stopped working

ZioBomba commented 1 month ago

I think there is still some problem, I tried to download a 50-episode series, but after the first 5-6 episodes it gives me error, every now and then it downloads one and many it skips with the error 420 https://i.imgur.com/apZaNMz.png

acteiaa commented 1 month ago

Unlike the other version, this one you have to wait a while for it to work again, you can't download several episodes ç.ç

stratuma commented 1 month ago

It looks like a token error, maybe refresh the user token more often

acteiaa commented 1 month ago

The limit is 5 every 5 minutes

acteiaa commented 1 month ago

To get it working again, you need to close the app and open it again.

stratuma commented 1 month ago

@hama3254 could you please add more logging so we can see the crunchyroll response not only the error code.

stratuma commented 1 month ago

because since the new api update the switch endpoint also has a active stream limit. After you fetch the mpd you have to invalidate the video token:

JS example: const response = await fetch('https://cr-play-service.prd.crunchyrollsvc.com/v1/token/${contentid}/${videotoken}/inactive', { method: 'PATCH' })

stratuma commented 1 month ago

It looks like a token error, maybe refresh the user token more often

At this point its wrong, the error should be the activestream limit

hama3254 commented 1 month ago

@hama3254 could you please add more logging so we can see the crunchyroll response not only the error code.

Last time I tried that I was unable to change the curl command to do so.

because since the new api update the switch endpoint also has a active stream limit. After you fetch the mpd you have to invalidate the video token:

JS example: const response = await fetch('https://cr-play-service.prd.crunchyrollsvc.com/v1/token/${contentid}/${videotoken}/inactive', { method: 'PATCH' })

I see, I add this after I get home from work. This should be a simple fix.

CarrilloTlx commented 1 month ago

Hello everyone!

I want to share my Crunchyroll project, which is designed to download anime episodes. Currently, I've encountered a JSON Web Token (JWT) authentication issue. It seems that there are difficulties in authenticating access to the Crunchyroll API, preventing the download process from functioning correctly.

This project is programmed in C#.

If anyone has experience with these types of issues or is interested in contributing, it would be great to have your help in resolving this problem!

Here's the link to the project repository: Crunchyroll Project Repository

Any contributions or suggestions would be greatly appreciated! Thank you!

[Image removed]

hama3254 commented 1 month ago

@CarrilloTlx I removed the image since I am not sure about all the data that have been shown on it. For security reasons I would recommend to check all data on a screenshot or log for any kind of authorization information.

if you get the same JSON response you might need to use the suggested by @stratuma

User-Agent: Crunchyroll/1.8.0 Nintendo Switch/12.3.12.0 UE4/4.27

It seems like they changes the API again. I am not sure righ now if (or what) i can do about it. It also may take some days for me to take a proper look at this. grafik

Elwador commented 1 month ago

@CarrilloTlx i have also created a downloader in c# maybe you find a solution there

but it sounds like the original issue and you have to change the user agent

cr-ytdlp commented 1 month ago

this works also

await fetch('https://cr-play-service.prd.crunchyrollsvc.com/v1/token/${episodeId}/${videoStreamToken}', {method: 'DELETE'});

and you should see an error TOO_MANY_ACTIVE_STREAMS and at that point you can clear all active streams, if wanted e.g.

if (exception.error === 'TOO_MANY_ACTIVE_STREAMS' && exception.activeStreams?.length) {
  for (const activeStream of exception.activeStreams) {
    await fetch('https://cr-play-service.prd.crunchyrollsvc.com/v1/token/${activeStream.contentId}/${activeStream.token}', {method: 'DELETE'});
  }
}
hama3254 commented 1 month ago

v3.23.4 is now online and should add the token deletion.

@stratuma i also changed the error output grafik

stratuma commented 1 month ago

this works also

await fetch('https://cr-play-service.prd.crunchyrollsvc.com/v1/token/${episodeId}/${videoStreamToken}', {method: 'DELETE'});

and you should see an error TOO_MANY_ACTIVE_STREAMS and at that point you can clear all active streams, if wanted e.g.

if (exception.error === 'TOO_MANY_ACTIVE_STREAMS' && exception.activeStreams?.length) {
  for (const activeStream of exception.activeStreams) {
    await fetch('https://cr-play-service.prd.crunchyrollsvc.com/v1/token/${activeStream.contentId}/${activeStream.token}', {method: 'DELETE'});
  }
}

The problem here if you delete all active streams it could happen that you delete a token you are using, that results a mpd fetch error.

acteiaa commented 1 month ago

image I was even scared by the size of the error

acteiaa commented 1 month ago

but it is working it was only one episode that this error appeared

stratuma commented 1 month ago

image I was even scared by the size of the error

Cloudflare error, interesting. Never got one over that endpoint

Borufanss commented 1 month ago

Captura Que tengo que hacer aquí? Osea que debo escribir ahí

hama3254 commented 1 month ago

I was even scared by the size of the error

i should probably rebuild something like the .net crash message. having the error code at the top and the details with the text. grafik

Cloudflare error, interesting. Never got one over that endpoint

This is at the objects request which is still a rebuild of what the webbrowser does.

hama3254 commented 1 month ago

@Borufanss due to changes on CR side the login of the webbrowser does not work anymore. We need to fake it as a Switch app login, the downloader does that but i need the login details for that.

stratuma commented 1 month ago

image

Idk what crunchyroll changed but I have so many fetch fails since the new update, maybe they added a new ratelimit. (Failed already after downloading the audio of the 3rd video added in download list)

hama3254 commented 1 month ago

@stratuma where do you get that message from? I see no problem fully downloading 8 episodes within 8 minutes. grafik

stratuma commented 1 month ago

@stratuma where do you get that message from? I see no problem fully downloading 8 episodes within 8 minutes. grafik

No i'm speaking of the api not of your downloader, this is a error I get with my downloader.

hama3254 commented 1 month ago

No i'm speaking of the api not of your downloader, this is a error I get with my downloader.

that is why i asked where you get the error from, both of your projects are based on the same APIs thats why i was surprised since my downloader works fine.

stratuma commented 1 month ago

No i'm speaking of the api not of your downloader, this is a error I get with my downloader.

that is why i asked where you get the error from, both of your projects are based on the same APIs thats why i was surprised since my downloader works fine.

Do you check if every part gets downloaded correctly?

hama3254 commented 1 month ago

Do you check if every part gets downloaded correctly?

My files look fine but i also still use the hls stream.

stratuma commented 1 month ago

Do you check if every part gets downloaded correctly?

My files look fine but i also still use the hls stream.

Oh ok, I use the dash stream

Daigh commented 1 month ago

Captura Que tengo que hacer aquí? Osea que debo escribir ahí

e-mail and password of your chunchyroll account