chris124567 / hulu

Hulu downloader written in Go (Code removed in response to request)
237 stars 83 forks source link

Download issue #10

Closed ChaoticCyber closed 2 years ago

ChaoticCyber commented 2 years ago

Whether movie or tv show, same error. I can use the query command just fine, but not the download command.

panic: proto: cannot parse invalid wire-format data

goroutine 1 [running]:
main.main()
        /home/mantiqulla/hulu/main.go:172 +0x1c93

Edit: Using Ubuntu on windows; go version 1.16.12

Edit2: crap, I don't think I read through the dependencies good enough. looking into that now

Edit3: nope wasn't a bento problem

chris124567 commented 2 years ago

Try updating :) I just updated the private key with a new one

ChaoticCyber commented 2 years ago

Completely removed the directory, ran a git clone, cd'd into the directory, ran go build (not sure if that was necessary) Successfully ran a query, then hit the same error again when running the DL command.

I think if I tested it on an actual Linux box it would work. Probably has something to do with this WSL Ubuntu crap on Windows.

chris124567 commented 2 years ago
$ HULU_SESSION="xxxxxxxx" go run . download -id="76187e1d-1bd0-491d-8c20-58146b1f0b3b"
MPD URL:  https://manifest-dp.hulustream.com/dash/61276064.mpd?xxxxxxxxxxxx
Decryption command:  mp4decrypt input.mp4 output.mp4 --key d34eba104dfc5b8caefe5dcb278a5d4b:5f68df92d0108d43941cc21708da7e92

Works here. Very strange

Edit: I cannot reproduce this. Tried a TV show and a movie and both worked. Maybe IP address has something to do with it? I'm from the US.

ChaoticCyber commented 2 years ago

Just tested the exact same method I used in a kali VM and got the same error so I must be doing something wrong. 🤔 I noticed you used a different syntax so I'll try that

Edit: nope same error... maybe my bento4 installation didn't work.. but you'd think I'd get a dependency error... no idea

ChaoticCyber commented 2 years ago

Yup US here too

chris124567 commented 2 years ago

Bento4 and yt-dlp are not actually needed to use the Go program. The Go program just gets the keys and links that you can provide to mp4decrypt and yt-dlp to retrieve and decrypt the mp4.

ChaoticCyber commented 2 years ago

Well crap. Then maybe i'm installing it wrong

Git clone, cd into dir, go build, then run... should work no?

ChaoticCyber commented 2 years ago

Well it is working for the most part given I can run search queries, just not the download command.

ChaoticCyber commented 2 years ago

image

ChaoticCyber commented 2 years ago

image

chris124567 commented 2 years ago

Try adjusting this line to the user agent of whatever browser you are signed into Hulu on.

chris124567 commented 2 years ago

That happens to be my user agent but obviously everyone doesn't have the same setup as me. I suspect it's Hulu/Widevine doing some kind of risk/fingerprint analysis to see what requests are legitimate (i.e. session was signed in from Windows Chrome but user agent suggests Linux Chrome -> fraud).

ChaoticCyber commented 2 years ago

That was it. 🚀

ChaoticCyber commented 2 years ago

Awesome, thanks for the quick troubleshooting.

chris124567 commented 2 years ago

I guess I'm gonna have to make the user agent customizable. Thanks for finding this issue :+1: