hulu.sh
Re: hulu.sh
Well I am sorry to say after a good hard look, I did not find an updated API for
Hulu. If you do a search on Google you will see that I was the only one who even
knew about the old one to begin with. Perhaps they removed it, or hid it even
better.
I have decided to remove the script. If you wish to find it the last commit will
be at
github.com/svnpenn/a/blob/98ab611/hulu.sh
If you get some new information that merits it, I will restore the script.
Hulu. If you do a search on Google you will see that I was the only one who even
knew about the old one to begin with. Perhaps they removed it, or hid it even
better.
I have decided to remove the script. If you wish to find it the last commit will
be at
github.com/svnpenn/a/blob/98ab611/hulu.sh
If you get some new information that merits it, I will restore the script.
Re: hulu.sh
Ain't pretty but it works...
Code: Select all
if quiet command -v jq
then
wget --quiet --output-document=/tmp/hulu.html $arg_url
grep --only-matching --max-count=1 'window._preloadedFastStartVideo.*\}\\n' hulu.html > html.hulu
sed 's/window._preloadedFastStartVideo = \(.*\)\\n *try.*/\1/g' ../tmp/html.hulu | sed 's/\(":\) */\1/g' | sed 's/\\\("\)/\1/g' | sed 's/\(,\) \("\)/\1\2/g' | sed 's/\n|\r//g' > ../tmp/html.hulu
flv=$(jq -r '"\(.show.name) S\(.season_number)E\(.episode_number) - \(.title)"' ../tmp/html.hulu | tr -d '\r' | tr -d '\n')
else
flv=$BASH_REMATCH
fi
Re: hulu.sh
stackoverflow.com/a/1732454DaVyper wrote:Ain't pretty but it works...
Re: hulu.sh
well it isn't just parsing html in regex that makes it ugly - it's parsing json that is embedded in javascript, that then is embedded further into html
only other way is through grabbing some urls that are tokenized though the token is also stored in the same f'd up html cobble-job as the json i figured out how to parse out
only other way is through grabbing some urls that are tokenized though the token is also stored in the same f'd up html cobble-job as the json i figured out how to parse out

Re: hulu.sh
Much Much Cleaner...
For TV Episodes (and *SOME* TV Movies)
For Movies
For TV Episodes (and *SOME* TV Movies)
Code: Select all
if quiet command -v jq
then
# flv=$(wget -qO- "$arg_url" | grep -o -e '{\\"id\\":.*game\\": null}' | sed 's/\\//g' | jq -r '.title' | sed 's/[\/:\|\<\>]/ - /g' | tr -d '[\?\*]' | sed 's/ / /g' | tr -d '[\r\n"]')
flv=$(wget -qO- "$arg_url" | grep -o -e '{\\"id\\":.*game\\": null}' | sed 's/\\//g' | jq -r '"\(.show.name) S\(.season_number)-E\(.episode_number) - \(.title)"' | sed 's/"//g' | sed 's/ Snull-Enull -/ -/g;s/ S1-Enull -/ -/g;s/ Snull-E1 -/ -/g;s/^null -//g' | sed 's/[\/:\|\<\>]/ - /g' | tr -d '[\?\*]' | sed 's/ / /g' | tr -d '[\r\n"]')
else
flv=$BASH_REMATCH
fi
Code: Select all
if quiet command -v jq
then
flv=$(wget -qO- "$arg_url" | grep -o -e '{\\"id\\":.*game\\": null}' | sed 's/\\//g' | jq -r '.title' | sed 's/[\/:\|\<\>]/ - /g' | tr -d '[\?\*]' | sed 's/ / /g' | tr -d '[\r\n"]')
# flv=$(wget -qO- "$arg_url" | grep -o -e '{\\"id\\":.*game\\": null}' | sed 's/\\//g' | jq -r '"\(.show.name) S\(.season_number)-E\(.episode_number) - \(.title)"' | sed 's/"//g' | sed 's/ Snull-Enull -/ -/g;s/ S1-Enull -/ -/g;s/ Snull-E1 -/ -/g;s/^null -//g' | sed 's/[\/:\|\<\>]/ - /g' | tr -d '[\?\*]' | sed 's/ / /g' | tr -d '[\r\n"]')
else
flv=$BASH_REMATCH
fi
Re: hulu.sh
If you know Git, it would be better to fork the repo, so you can link to GitHub code with highlighting, and not have to paste these ugly code hunksDaVyper wrote:Much Much Cleaner...
Re: hulu.sh
Has anyone else been having trouble downloading from Hulu? For the CDN, I always used akamai, but it seems to have disappeared in one of the past few days. limelight doesn't always work, but darwin-edgecast does seem to be reliable.
Output I get when it doesn't work:
Output I get when it doesn't work:
Code: Select all
Connecting ...
WARNING: HandShake: Type mismatch: client sent 6, server answered 9
INFO: Connected...
ERROR: rtmp server sent error
ERROR: rtmp server requested close
Re: hulu.sh
I no longer provide free support for RtmpDump / hulu.sh script because of bad blood with other developers. However if you are interested in paid support please email / PM me.BenoitRen wrote:Has anyone else been having trouble downloading from Hulu?
Re: hulu.sh
...What? I don't understand. Could you provide some context for that?
Re: hulu.sh
Here is just some of the fun historyBenoitRen wrote:...What? I don't understand. Could you provide some context for that?
I only posted it because you said I should if the worst should happen. Well
Xeebo had my repo taken down for 10 days on a DMCA notice, plus had my Dropbox
account terminated and temp banned on the forums. So I would say that was the
worst.
It should be clear to everyone that while Howard is a brilliant programmer, he
is a child. He threatened KSV with modifying license to exclude him specifially,
which anyone with a brain will know you cannot do that. He frequently is rude
and dismissive on the mailing list and non-existent on the forums. I was
moderated off the mailing list without so much as an email from him, and my
emails regarding the issue were ignored.
For him to be so disrespectful of one of maybe 5 developers on this project is
disturbing.
'