Skip to content

Instantly share code, notes, and snippets.

@caffo
Created June 25, 2011 05:15
Show Gist options
  • Save caffo/1046180 to your computer and use it in GitHub Desktop.
Save caffo/1046180 to your computer and use it in GitHub Desktop.
Simple script to trigger the 'send to kindle' button on Instapaper
#!/usr/bin/env ruby
require 'rubygems'
require 'mechanize'
mecha = Mechanize.new { |agent| agent.user_agent_alias = 'Mac Safari' }
login = mecha.get("http://www.instapaper.com/user/login")
login.form_with(:action => '/user/login') do |f|
f.username = "instapaper@username.com"
f.password = "instapaper21" # if any
end.click_button
kindle_page = mecha.get("http://www.instapaper.com/user/kindle")
kindle_page.form_with(:action => '/user/kindle_send_now').click_button
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment