Created
June 25, 2011 05:15
-
-
Save caffo/1046180 to your computer and use it in GitHub Desktop.
Simple script to trigger the 'send to kindle' button on Instapaper
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 | |
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