Skip to content

Instantly share code, notes, and snippets.

@cabron
Created September 18, 2011 05:38
Show Gist options
  • Save cabron/1224774 to your computer and use it in GitHub Desktop.
Save cabron/1224774 to your computer and use it in GitHub Desktop.
require 'net/http'
url = URI.parse('http://www.wykop.pl')
Net::HTTP.start(url.host, url.port) {|http|
http.get('/ranking').body.scan(/dodane przez ([^\"]+)/).each {|nick| open(nick.first + ".jpg", 'wb') {|f|
f.write Net::HTTP.get URI.parse http.get('/ludzie/' + nick.first).body[/url.+\)/][4..-2]
} }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment