require 'net/http' http = Net::HTTP.start('en.wikipedia.org', 80, "localhost", 80) for c in 'A'..'Z' path = "/w/index.php?title=List_of_airports_by_ICAO_code:_#{c}&printable=yes" puts path File.open("z-list-#{c}.html", 'w') {|ofp| http.get(path) {|body| ofp.write body putc '.' STDOUT.flush } } end http.finish puts "done"