Youtube html extraction

I’m building an application using open-uri and hpricot for html contents
of a web page. The problem is when i enter the url of youtube
ie.‘http://www.youtube.com’ an error is shown stating:

/usr/lib/ruby/1.8/open-uri.rb:277:in open_http': 400 Bad Request (OpenURI::HTTPError) from /usr/lib/ruby/1.8/open-uri.rb:616:inbuffer_open’
from /usr/lib/ruby/1.8/open-uri.rb:164:in open_loop' from /usr/lib/ruby/1.8/open-uri.rb:162:incatch’
from /usr/lib/ruby/1.8/open-uri.rb:162:in open_loop' from /usr/lib/ruby/1.8/open-uri.rb:132:inopen_uri’
from /usr/lib/ruby/1.8/open-uri.rb:518:in open' from /usr/lib/ruby/1.8/open-uri.rb:30:inopen’
from htmlParse.rb:32

I dont know why it is shown like this. I can get the data of other url’s
except this one. Can anybody please help. It is urgent.

Regards,
Arun K.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs