Skip to content

Instantly share code, notes, and snippets.

@ricburton
Created November 28, 2011 09:01
Show Gist options
  • Save ricburton/1399696 to your computer and use it in GitHub Desktop.
Save ricburton/1399696 to your computer and use it in GitHub Desktop.
Instagram scraper using mechanize
require 'rubygems'
require 'mechanize'
require 'uri'
url = "http://instagr.am/p/WOkyj"
@mech = Mechanize.new
@page = @mech.get(url)
@imgs = @page.search("img[@src]").map{|src| src['src']}
puts @imgs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment