I don’t write much code these days and felt it was time to sharpen the saw.
I have a need to download a ton of images from a site (I got permission first…) but it is going to take forever to do by hand. Even though there are tons of tools out there for image crawling I figured this would be a great exercise to brush up on some skills and delve further into a language I am still fairly new to, Ruby. This allows me to use basic language constructs, network IO, and file IO, all while getting all the images I need in a fast manner.
As I have mentioned a few times on this blog, I am still new to Ruby so any advice for how to make this code cleaner is appreciated.
You can download the file here: http://www.mcdonaldland.info/files/crawler/crawl.rb
Here is the source: