Skip to content

Instantly share code, notes, and snippets.

@dphase
Created October 9, 2012 22:32
Show Gist options
  • Save dphase/3861872 to your computer and use it in GitHub Desktop.
Save dphase/3861872 to your computer and use it in GitHub Desktop.
kewsh
#!/usr/bin/env ruby
# ---------------------------------------------------------------------
# kewsh dawg
# ---------------------------------------------------------------------
require "mechanize"
abort('Must supply site as argument') if ARGV[0].nil?
url = ARGV[0]
agent = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/534.55.3 (KHTML, like Gecko) Version/5.1.3 Safari/534.53.10'
site = Mechanize.new
site.user_agent = agent
site.get(url)
puts site.page.body
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment