# Grabbing Text From a Website

**URL:** <https://www.ruby-forum.com/t/grabbing-text-from-a-website/146447>\
**Category:** Ruby\
**Created:** [August 21, 2008, 9:38am UTC](https://www.ruby-forum.com/t/grabbing-text-from-a-website/146447 "2008-08-21T09:38:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kylemathews](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/51bf81/32.png) [@kylemathews](https://www.ruby-forum.com/u/kylemathews)\
**Post date:** [August 21, 2008, 9:38am UTC](https://www.ruby-forum.com/t/grabbing-text-from-a-website/146447/1 "2008-08-21T09:38:57Z")

</div>

Let’s say I wanted to make a program that traversed all 125 products on  
this page:[http://www.menshealth.com/eatthis/Best-Grocery-Foods/](http://www.menshealth.com/eatthis/Best-Grocery-Foods/), grabbed  
the text from each one, and compiled them into a list in a text file.

First off, is this even possible? If so, can you give me some links or  
advice that would aid me in this grand project?

Thank you!

---

<div class="post-metadata">

**Author:** ![kylemathews](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/51bf81/32.png) [@kylemathews](https://www.ruby-forum.com/u/kylemathews)\
**Post date:** [August 21, 2008, 10:22am UTC](https://www.ruby-forum.com/t/grabbing-text-from-a-website/146447/2 "2008-08-21T10:22:40Z")

</div>

On Thu, Aug 21, 2008 at 3:35 AM, Kyle M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> Let’s say I wanted to make a program that traversed all 125 products on  
> this page:[http://www.menshealth.com/eatthis/Best-Grocery-Foods/](http://www.menshealth.com/eatthis/Best-Grocery-Foods/), grabbed  
> the text from each one, and compiled them into a list in a text file.
> 
> First off, is this even possible? If so, can you give me some links or  
> advice that would aid me in this grand project?

I have used: mechanize, scrubyt, and firewatir

[http://www.rubyrailways.com/data-extraction-for-web-20-screen-scraping-in-rubyrails](http://www.rubyrailways.com/data-extraction-for-web-20-screen-scraping-in-rubyrails)

> **[Scrape the web with ruby](https://muharem.wordpress.com/2007/09/04/scrape-the-web-with-ruby/)**
>
> Introduction In the last few months I have taken some time to play with a number of dynamic languages. My experiments were mostly in the “web hacks” category e.g. fetching files from th…

[http://www.johnyerhot.com/2008/05/19/anatomy-of-a-ruby-web-scraper/](http://www.johnyerhot.com/2008/05/19/anatomy-of-a-ruby-web-scraper/)
