[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

script to visit a page

akanksha.baid

7/7/2006 7:32:00 PM

I am pretty new to scripting in general and ruby and rails in
particular. I need to visit a list of URLs and grep for a certain word
on those pages. How would I go about doing this in Ruby? Would
appreciate some pointers.
Thanks!
-A

3 Answers

Kenosis

7/7/2006 7:38:00 PM

0

Search this group: there have been several treatments of this question.

Ken

akanksha.baid@gmail.com wrote:
> I am pretty new to scripting in general and ruby and rails in
> particular. I need to visit a list of URLs and grep for a certain word
> on those pages. How would I go about doing this in Ruby? Would
> appreciate some pointers.
> Thanks!
> -A

Austin Ziegler

7/7/2006 7:38:00 PM

0

On 7/7/06, akanksha.baid@gmail.com <akanksha.baid@gmail.com> wrote:
> I am pretty new to scripting in general and ruby and rails in
> particular. I need to visit a list of URLs and grep for a certain word
> on those pages. How would I go about doing this in Ruby? Would
> appreciate some pointers.

There are examples of how to do this in the pickaxe. Google for
"open-uri" and/or "Ruby Net::HTTP" for examples. It's basic stuff.

-austin
--
Austin Ziegler * halostatue@gmail.com * http://www.halo...
* austin@halostatue.ca * http://www.halo...feed/
* austin@zieglers.ca

Clint

7/7/2006 11:12:00 PM

0

<akanksha.baid@gmail.com> wrote in message
news:1152300696.221996.245790@h48g2000cwc.googlegroups.com...
> I am pretty new to scripting in general and ruby and rails in
> particular. I need to visit a list of URLs and grep for a certain word
> on those pages. How would I go about doing this in Ruby? Would
> appreciate some pointers.
> Thanks!
> -A
>

Several months ago I was successful using the example in the Pickaxe book to
suck the data off a forum web page and parse it to see if there were any new
posts since the last time I checked. Not a very large script at all.
Follow the example and you should figure it out pretty fast.

Todd Burch