title: Download files from URL with Ruby
body: <p>I have a url that contains many zip files that I need to download local copies of them. I have so far:</p>
  
  <pre><code>require 'open-uri'
  require 'pry'
  
  def download_xml(url, dest)
    open(url) do |u|
      File.open(dest, 'wb') { |f| f.write(u.read) }
    end
  end
  
  urls = ["http://feed.omgili.com/5Rh5AMTrc4Pv/mainstream/posts/"]
  
  urls.each { |url| download_xml(url, url.split('/').last) }
  </code></pre>
  
  <p>However, I can't seem to access the zip files that are at that location or loop through them. How would I loop through each zip file at the end of that URL so that they can be accessed in that array and downloaded by the method?</p>