Skip to content

Instantly share code, notes, and snippets.

@dragon3
Created November 24, 2009 01:55
Show Gist options
  • Save dragon3/241562 to your computer and use it in GitHub Desktop.
Save dragon3/241562 to your computer and use it in GitHub Desktop.
#!/usr/bin/perl
use strict;
use warnings;
use LWP::UserAgent;
my $ua = LWP::UserAgent->new;
$ua->agent(
"Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)");
my $res = $ua->get("http://twitter.jp");
if ( $res->is_success ) {
print $res->as_string;
}
else {
die $res->status_line;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment