Hi all,

Ruby 1.8.4
www-mechanize 0.4.5

I've got a web page.  On that page are a series of links to .csv files.
I need a way to download a particular csv file.  This file can either be
loaded into memory or onto the local filesystem - either way is fine.

I've gotten this far:

require 'mechanize'
include WWW

mech  = Mechanize.new
agent = mech.get(url)

page.links.each{ |link|
   p link
}

With that, I can see the links to the .csv files, which look like this
on inspection:

#<WWW::Link:0x33945a0 @node=<a href='foo_May_29_2006.csv'> ... </>,
@text="foo_May_29_..>", @href="foo_May_29_2006.csv">
#<WWW::Link:0x3393898 @node=<a href='foo_May_30_2006.csv'> ... </>,
@text="foo_May_30_..>", @href="foo_May_30_2006.csv">

How do I grab a particular file and load it into memory or onto the
local filesystem?  I tried using the 'text' method (based on the
examples file) but that didn't seem to work for me.

Thanks,

Dan


This communication is the property of Qwest and may contain confidential or
privileged information. Unauthorized use of this communication is strictly 
prohibited and may be unlawful.  If you have received this communication 
in error, please immediately notify the sender by reply e-mail and destroy 
all copies of the communication and any attachments.