PDA

View Full Version : Hulu download script


svnpenn
03-23-2012, 12:10 AM
I created a very basic Ruby script to download from Hulu.

It only works for Windows right now.

Feel free to use and improve it.

github.com/svnpenn/dotfiles/blob/master/bin/hulu.rb

Stream Ripper
03-23-2012, 12:54 AM
Awesome, thanks!

evol
03-23-2012, 07:40 AM
Hi have you any hints and tips on installing ruby on windows to use your script ?

Ive installed rubyinstaller version 1.8.7 and the DevKit and ran
gem install nokogiri
&
gem install nokogiri --platform=ruby

Still cant get your script to work ?

:(

svnpenn
03-23-2012, 11:05 AM
I'm at work right now.

I will try to make a write up for the script later today!

evol
04-03-2012, 02:49 PM
Any help on this please im really interested in this Ruby method.

Thanks :o

svnpenn
04-03-2012, 02:54 PM
Sorry for the delay. I have been trying to turn the script into a Ruby gem, so that it is easier to install.

I am new with Ruby so its been slow going, but it definitely works with Hulu, without:

* modifying hosts file
* RtmpSrv
* RtmpExplorer

evol
04-05-2012, 05:32 AM
Sorry for the delay. I have been trying to turn the script into a Ruby gem, so that it is easier to install.

I am new with Ruby so its been slow going, but it definitely works with Hulu, without:

* modifying hosts file
* RtmpSrv
* RtmpExplorer

Thanks for the update ill look forward to your little gem :D

svnpenn
04-05-2012, 10:00 AM
What issue did you have, maybe I can solve it for now.

evol
04-05-2012, 03:13 PM
What issue did you have, maybe I can solve it for now.

This is the error i get even though i have nokogiri installed from gem ?
C:\Documents and Settings\evol\Desktop\hulu>ruby hulu.rb
hulu.rb:4:in `require': no such file to load -- nokogiri (LoadError)
from hulu.rb:4

C:\Documents and Settings\evol\Desktop\hulu>

svnpenn
04-05-2012, 04:07 PM
Ok I see the problem

This script requires Ruby 1.9

If you are going to use Ruby 1.8 you need this diff

--- a/hulu.rb 2012-04-05 16:48:54 -0500
+++ b/hulu.rb 2012-04-05 17:02:56 -0500
@@ -1,6 +1,7 @@
#!/bin/env ruby
# nokogiri.org/Nokogiri/XML/Document
# tenderlovemaking.com/2008/12/04/nokogiris-slop-feature
+require 'rubygems'
require 'nokogiri'

# Dump process and parse

stackoverflow.com/a/5496053

evol
04-06-2012, 05:08 AM
Thanks got it working :D

What i did..........

1. Downloaded Ruby 1.9.3-p125 (http://rubyforge.org/frs/download.php/75848/rubyinstaller-1.9.3-p125.exe)

2. Downloaded RubyInstaller DevKit (https://github.com/downloads/oneclick/rubyinstaller/DevKit-tdm-32-4.5.2-20111229-1559-sfx.exe)

3. Setup DevKit..........

a) Extracted the DevKit.7z to C:\DevKit
b) From CMD Prompt > cd C:\DevKit
ruby dk.rb init
ruby dk.rb install
c) Test DevKit is working
gem install rdiscount --platform=ruby
d) Test that gem is working
ruby -rubygems -e "require 'rdiscount'; puts RDiscount.new('**Hello RubyInstaller**').to_html"

4. Update to the latest RubyGems version
gem update --system

5. Install nokogiri gem
gem install nokogiri

6. Finished run hulu.rb

:cool:

sebus
04-12-2012, 11:34 AM
One also needs procdump (http://technet.microsoft.com/en-us/sysinternals/dd996900) installed

as well as rtmpdump (http://rtmpdump.mplayerhq.hu/) (it is not good assuming everybody has it)

procdump
grep
strings
rtmpdump

files must be in same /bin folder as the hulu.rb (having them in system path ie \windows\system32 is not working)


If I only knew very easily which of the streams (35 in total) is actually the one I want...
But good bet is 1000_h264 stream...

Is there a way to save .mp4 (as in the stream) directly and not as .flv , so I do not have to remux it?

ffmpeg -i filename.flv -vcodec copy -acodec copy filename.mp4

sebus

svnpenn
04-12-2012, 11:50 AM
'strings' is not recognized as an internal or external command,
operable program or batch file.

This script is still a work in progress. Strings is a program you will need on your PATH for it to work. I want to remove this dependency by calling Win32 API directly. For now you can just download it.

github.com/svnpenn/vessel/downloads