Created
October 9, 2012 22:32
-
-
Save dphase/3861872 to your computer and use it in GitHub Desktop.
kewsh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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