# Help with Net::HTTP

**URL:** <https://www.ruby-forum.com/t/help-with-net-http/125448>\
**Category:** Ruby\
**Created:** [January 9, 2008, 6:44am UTC](https://www.ruby-forum.com/t/help-with-net-http/125448 "2008-01-09T06:44:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![shea](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/3ab097/32.png) [@shea](https://www.ruby-forum.com/u/shea)\
**Post date:** [January 9, 2008, 6:44am UTC](https://www.ruby-forum.com/t/help-with-net-http/125448/1 "2008-01-09T06:44:47Z")

</div>

Is there any method that will return certain html tags? For instance  
instead of printing the entire body I would like to print a div class. I  
looked through the rdocs but I didn’t really find anything.

---

<div class="post-metadata">

**Author:** ![shea](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/3ab097/32.png) [@shea](https://www.ruby-forum.com/u/shea)\
**Post date:** [January 9, 2008, 6:49am UTC](https://www.ruby-forum.com/t/help-with-net-http/125448/2 "2008-01-09T06:49:55Z")

</div>

> Is there any method that will return certain html tags? For instance  
> instead of printing the entire body I would like to print a div class. I  
> looked through the rdocs but I didn’t really find anything.

Your best bet is Hpricot.

[http://code.whytheluckystiff.net/hpricot/](http://code.whytheluckystiff.net/hpricot/)

–  
Giles B.

Podcast: [http://hollywoodgrit.blogspot.com](http://hollywoodgrit.blogspot.com)  
Blog: [http://gilesbowkett.blogspot.com](http://gilesbowkett.blogspot.com)  
Portfolio: [http://www.gilesgoatboy.org](http://www.gilesgoatboy.org)  
Tumblelog: [http://giles.tumblr.com](http://giles.tumblr.com)

---

<div class="post-metadata">

**Author:** ![shea](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/3ab097/32.png) [@shea](https://www.ruby-forum.com/u/shea)\
**Post date:** [January 9, 2008, 7:33am UTC](https://www.ruby-forum.com/t/help-with-net-http/125448/3 "2008-01-09T07:33:56Z")

</div>

Giles B. wrote:

> > Is there any method that will return certain html tags? For instance  
> > instead of printing the entire body I would like to print a div class. I  
> > looked through the rdocs but I didn’t really find anything.
> 
> Your best bet is Hpricot.
> 
> [http://code.whytheluckystiff.net/hpricot/](http://code.whytheluckystiff.net/hpricot/)
> 
> –  
> Giles B.
> 
> Podcast: [http://hollywoodgrit.blogspot.com](http://hollywoodgrit.blogspot.com)  
> Blog: [http://gilesbowkett.blogspot.com](http://gilesbowkett.blogspot.com)  
> Portfolio: [http://www.gilesgoatboy.org](http://www.gilesgoatboy.org)  
> Tumblelog: [http://giles.tumblr.com](http://giles.tumblr.com)

Thank you that was exactly what I was looking for.
