Skip to content

Instantly share code, notes, and snippets.

@toydestroyer
Created September 18, 2015 18:55
Show Gist options
  • Save toydestroyer/07f3f0682289239ff960 to your computer and use it in GitHub Desktop.
Save toydestroyer/07f3f0682289239ff960 to your computer and use it in GitHub Desktop.
Fetch all photos from Nike #WeRunMoscow 2015
arr = []
1.upto(25000) do |i|
puts "Fetch #{i}"
res = RestClient.get("https://s3.nikecdn.com/rrpcee/wrm15-gallery/#{i}.json")
JSON.parse(res).each do |row|
arr << row["image"]
end
end
arr.uniq!
arr.map! { |item| "https://s3.nikecdn.com/rrpcee/wrm15-gallery/#{item}" }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment