# Urlgrabber in Ruby

**URL:** <https://www.ruby-forum.com/t/urlgrabber-in-ruby/59753>\
**Category:** Ruby\
**Created:** [May 6, 2006, 1:34am UTC](https://www.ruby-forum.com/t/urlgrabber-in-ruby/59753 "2006-05-06T01:34:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pau\_Garcia\_i\_Quiles](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/b9e5f3/32.png) [@Pau\_Garcia\_i\_Quiles](https://www.ruby-forum.com/u/Pau_Garcia_i_Quiles)\
**Post date:** [May 6, 2006, 1:34am UTC](https://www.ruby-forum.com/t/urlgrabber-in-ruby/59753/1 "2006-05-06T01:34:51Z")

</div>

-----BEGIN PGP SIGNED MESSAGE-----  
Hash: SHA1

Hello,

I’m looking for something like the Python-esque URLGrabber package, but  
in  
Ruby. Any tip?

- urlgrabber is a pure python package that drastically simplifies the  
fetching  
of files. It is designed to be used in programs that need common (but  
not  
necessarily simple) url-fetching features. It is extremely simple to  
drop  
into an existing program and provides a clean interface to  
protocol-independant file-access. Best of all, urlgrabber takes care of  
all  
those pesky file-fetching details, and lets you focus on whatever it is  
that  
your program is written to do!  
[http://linux.duke.edu/projects/urlgrabber/](http://linux.duke.edu/projects/urlgrabber/)

Thank you.

* * *

Pau Garcia i Quiles  
[http://www.elpauer.org](http://www.elpauer.org)  
(Due to the amount of work, I usually need 10 days to answer)  
-----BEGIN PGP SIGNATURE-----  
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFEW+BK/DzYv9iGJzsRAvLrAKDHpkyCRD/J3tRwQNq8dwGajtDQRQCg5urg  
m+Bm2DpWoiEqur5Nwrpgt1M=  
=HGxE  
-----END PGP SIGNATURE-----

---

<div class="post-metadata">

**Author:** ![Pau\_Garcia\_i\_Quiles](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/b9e5f3/32.png) [@Pau\_Garcia\_i\_Quiles](https://www.ruby-forum.com/u/Pau_Garcia_i_Quiles)\
**Post date:** [May 6, 2006, 3:39am UTC](https://www.ruby-forum.com/t/urlgrabber-in-ruby/59753/2 "2006-05-06T03:39:25Z")

</div>

Pau Garcia i Quiles wrote:

> -----BEGIN PGP SIGNED MESSAGE-----  
> Hash: SHA1
> 
> Hello,
> 
> I’m looking for something like the Python-esque URLGrabber package, but  
> in  
> Ruby. Any tip?
> 
> - urlgrabber is a pure python package that drastically simplifies the  
> fetching  
> of files. It is designed to be used in programs that need common (but  
> not  
> necessarily simple) url-fetching features. It is extremely simple to  
> drop  
> into an existing program and provides a clean interface to  
> protocol-independant file-access. Best of all, urlgrabber takes care of  
> all  
> those pesky file-fetching details, and lets you focus on whatever it is  
> that  
> your program is written to do!  
> [http://linux.duke.edu/projects/urlgrabber/](http://linux.duke.edu/projects/urlgrabber/)
> 
> Thank you.
> 
> * * *
> 
> Pau Garcia i Quiles  
> [http://www.elpauer.org](http://www.elpauer.org)  
> (Due to the amount of work, I usually need 10 days to answer)  
> -----BEGIN PGP SIGNATURE-----  
> Version: GnuPG v1.4.1 (GNU/Linux)
> 
> iD8DBQFEW+BK/DzYv9iGJzsRAvLrAKDHpkyCRD/J3tRwQNq8dwGajtDQRQCg5urg  
> m+Bm2DpWoiEqur5Nwrpgt1M=  
> =HGxE  
> -----END PGP SIGNATURE-----

“open-uri” might serve your purposes. It allows you to work with  
http/ftp resources as you would a normal file object:

open(“[http://www.ruby-lang.org/](http://www.ruby-lang.org/)”) {|f|  
f.each\_line {|line| p line}  
}

[http://www.ruby-doc.org/stdlib/libdoc/open-uri/rdoc/index.html](http://www.ruby-doc.org/stdlib/libdoc/open-uri/rdoc/index.html)

Mully
