hulu.sh

Topics regarding RTMPDump.
svnpenn
Posts: 263
Joined: Tue Nov 01, 2011 12:19 am

Re: hulu.sh

Postby svnpenn » Wed Jan 08, 2014 4:18 am

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.

DaVyper
Posts: 5
Joined: Mon Jan 06, 2014 5:11 am

Re: hulu.sh

Postby DaVyper » Wed Jan 08, 2014 4:32 am

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

svnpenn
Posts: 263
Joined: Tue Nov 01, 2011 12:19 am

Re: hulu.sh

Postby svnpenn » Wed Jan 08, 2014 6:34 am

DaVyper wrote:Ain't pretty but it works...


stackoverflow.com/a/1732454

DaVyper
Posts: 5
Joined: Mon Jan 06, 2014 5:11 am

Re: hulu.sh

Postby DaVyper » Wed Jan 08, 2014 7:34 am

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 :P

DaVyper
Posts: 5
Joined: Mon Jan 06, 2014 5:11 am

Re: hulu.sh

Postby DaVyper » Sun Jan 19, 2014 10:34 am

Much Much Cleaner...

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


For 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

svnpenn
Posts: 263
Joined: Tue Nov 01, 2011 12:19 am

Re: hulu.sh

Postby svnpenn » Sun Jan 19, 2014 8:14 pm

DaVyper wrote:Much Much Cleaner...


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 hunks

BenoitRen
Posts: 8
Joined: Sat Aug 24, 2013 8:26 pm

Re: hulu.sh

Postby BenoitRen » Thu Feb 20, 2014 6:48 pm

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:

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

svnpenn
Posts: 263
Joined: Tue Nov 01, 2011 12:19 am

Re: hulu.sh

Postby svnpenn » Fri Feb 21, 2014 2:38 am

BenoitRen wrote:Has anyone else been having trouble downloading from Hulu?


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
Posts: 8
Joined: Sat Aug 24, 2013 8:26 pm

Re: hulu.sh

Postby BenoitRen » Fri Feb 21, 2014 10:40 am

...What? I don't understand. Could you provide some context for that?

svnpenn
Posts: 263
Joined: Tue Nov 01, 2011 12:19 am

Re: hulu.sh

Postby svnpenn » Fri Feb 21, 2014 2:14 pm

BenoitRen wrote:...What? I don't understand. Could you provide some context for that?


Here is just some of the fun history

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.


Return to “RTMPDump Specific”

Who is online

Users browsing this forum: No registered users and 1 guest