Skip to content

Instantly share code, notes, and snippets.

@djacobs djacobs/gist:375437
Created Apr 22, 2010

Embed
What would you like to do?
require WWW::Instapaper::Client;
my $paper = WWW::Instapaper::Client->new(
username => 'hellotypepad@mac.com', # E-mail OR username
password => '',
);
my $result = $paper->add(
url => 'http://hello.typepad.com/hello/2010/04/hbos-treme-creator-david-simon-explains-it-all-for-you.html',
title => "Treme Story", # optional, will try to get automatically if not given
);
if (defined $result) {
print "URL added: ", $result->[0], "\n"; # http://instapaper.com/go/######
print "Title: ", $result->[1], "\n"; # Title of page added
}
else {
# Must be an error
warn "Was error: " . $paper->error . "\n";
}
__END__
selection => 'Some text on the page', #optional
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.