Skip to content

Instantly share code, notes, and snippets.

@maxjustus
Created December 10, 2011 04:33
Show Gist options
  • Save maxjustus/1454583 to your computer and use it in GitHub Desktop.
Save maxjustus/1454583 to your computer and use it in GitHub Desktop.
Rando bukk.it
require 'net/http'
p = Net::HTTP.get(URI.parse('http://bukk.it'))
regexp = /href=\"(.*?\..*?)\"/
images = p.scan(regexp).flatten
image = images[rand(images.length)]
puts "http://bukk.it/" + image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment