crunchy-labs / crunchy-cli

👇 Command-line downloader for Crunchyroll
MIT License
606 stars 63 forks source link

Facing error while using archive compress command. #96

Closed GaganMalik025 closed 1 year ago

GaganMalik025 commented 1 year ago

So my command is

crunchy archive -c "The Legend of Galactic Heroes.zip" -l en-US https://beta.crunchyroll.com/series/GRW4DXNEY/legend-of-the-galactic-heroes-die-neue-these

This is what happens next -

=> Downloading episode `First Campaign` to `First Campaign.mkv` (merging video for additional formats)
=>      Episode: S03E25
=>      Audio: en-US
=>      Subtitle:
=>      Resolution: 1920x1080px
=>      FPS: 23.97
=> Downloading video [===========>         ]  55%      425/759panic: crypto/cipher: input not full blocks

goroutine 835 [running]:
crypto/cipher.(*cbcDecrypter).CryptBlocks(0xffaed0?, {0xc00057c180?, 0xc000200200?, 0x10?}, {0xc00019e000?, 0x13e?, 0x0?})
        C:/Program Files/Go/src/crypto/cipher/cbc.go:141 +0x44b
github.com/crunchy-labs/crunchyroll-go/v3.Downloader.decryptSegment({{0xff9020, 0xc000218008}, {0xc0000de6c0, 0x32}, 0x1, {0xffbbf0, 0xc00029b440}, 0x14, 0xc0005971e0, 0x0, ...}, ...)
        C:/Users/HeheNoPrivacyHere/go/pkg/mod/github.com/crunchy-labs/crunchyroll-go/v3@v3.0.2/downloader.go:384 +0x1fc
github.com/crunchy-labs/crunchyroll-go/v3.Downloader.downloadSegment({{0xff9020, 0xc000218008}, {0xc0000de6c0, 0x32}, 0x1, {0xffbbf0, 0xc00029b440}, 0x14, 0xc0005971e0, 0x0, ...}, ...)
        C:/Users/HeheNoPrivacyHere/go/pkg/mod/github.com/crunchy-labs/crunchyroll-go/v3@v3.0.2/downloader.go:347 +0xc7
github.com/crunchy-labs/crunchyroll-go/v3.Downloader.downloadSegments.func1()
        C:/Users/HeheNoPrivacyHere/go/pkg/mod/github.com/crunchy-labs/crunchyroll-go/v3@v3.0.2/downloader.go:265 +0x43a
created by github.com/crunchy-labs/crunchyroll-go/v3.Downloader.downloadSegments
        C:/Users/HeheNoPrivacyHere/go/pkg/mod/github.com/crunchy-labs/crunchyroll-go/v3@v3.0.2/downloader.go:253 +0x2de

Any idea what's happening? Also, the URL doesn't work as is. I have to replace 'www' with 'beta' and only then it works.

bytedream commented 1 year ago

Does the same appear when using v3.0.0-dev.5?. Note that compress / -c does not exist anymore in this version and you have to login a bit differently.

Use your account credentials as login:

$ crunchy --credentials "user:password" archive -l en-US https://www.crunchyroll.com/series/GRW4DXNEY/legend-of-the-galactic-heroes-die-neue-these

Use the etp_rt cookie as login:

$ crunchy --etp-rt "<etp-rt cookie>" archive -l en-US https://www.crunchyroll.com/series/GRW4DXNEY/legend-of-the-galactic-heroes-die-neue-these
GaganMalik025 commented 1 year ago

I actually did try those commands earlier but every time it gave me => An error occurred: unknown flag: --credentials or => An error occurred: unknown flag: --etp-rt Because of this, I fell back on those previous commands which I believe are for earlier versions

Also when I am not using --compress and just downloading all the episodes straight, all the episodes are downloaded 2 times, like even the list which appears showing all the episodes, there are 24 episodes instead of 12 for season 1 (example). I thought "atleast it's downloading" but after episode 6-7 I think the download automatically stopped with that same error I mentioned above, something about input not full blocks

bytedream commented 1 year ago

I actually did try those commands earlier but every time it gave me => An error occurred: unknown flag: --credentials or => An error occurred: unknown flag: --etp-rt Because of this, I fell back on those previous commands which I believe are for earlier versions

They only work in the 3.0.0-dev versions.


Also when I am not using --compress and just downloading all the episodes straight, all the episodes are downloaded 2 times, like even the list which appears showing all the episodes, there are 24 episodes instead of 12 for season 1 (example). I thought "atleast it's downloading" but after episode 6-7 I think the download automatically stopped with that same error I mentioned above, something about input not full blocks

That episodes are downloaded twice is caused by Crunchyroll flagging all japanese audio as english 🙃. The block error occurs because Crunchyroll delivers broken/invalid streaming data which can't be handled correctly. Both issues are addressed in v3.0.0-dev.5. The handling of incorrect flagging of japenese audio as english should work all the time. The handling of the broken blocks error was also addressed, by implementing a retry and more accurate error messages if the maximum retries were exceeded.

GaganMalik025 commented 1 year ago

So I unzipped v3.0.0-dev5, ran the build and again tried to run crunchy --etp-rt "<token>" command. Still the same error that --etp-rt is unrecognised.

GaganMalik025 commented 1 year ago

So I previously was using v2.3.3 and I think it was installed using "go" because even to this day whenever I use "crunchy" it points to C:\Users\User\scoop\apps\crunchyroll-go\2.3.3 how can I change this to one that I just downloaded (v3.0.0-dev.6)?

GaganMalik025 commented 1 year ago

It is fixed now. Help from discord. Thanks