# Youtube html extraction

**URL:** <https://www.ruby-forum.com/t/youtube-html-extraction/162970>\
**Category:** Rails\
**Created:** [March 16, 2009, 10:24am UTC](https://www.ruby-forum.com/t/youtube-html-extraction/162970 "2009-03-16T10:24:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![arunvoip](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/e8c25b/32.png) [@arunvoip](https://www.ruby-forum.com/u/arunvoip)\
**Post date:** [March 16, 2009, 10:24am UTC](https://www.ruby-forum.com/t/youtube-html-extraction/162970/1 "2009-03-16T10:24:20Z")

</div>

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](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:in `buffer\_open’  
from /usr/lib/ruby/1.8/open-uri.rb:164:in `open_loop' from /usr/lib/ruby/1.8/open-uri.rb:162:in `catch’  
from /usr/lib/ruby/1.8/open-uri.rb:162:in `open_loop' from /usr/lib/ruby/1.8/open-uri.rb:132:in `open\_uri’  
from /usr/lib/ruby/1.8/open-uri.rb:518:in `open' from /usr/lib/ruby/1.8/open-uri.rb:30:in `open’  
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.
