Created
March 24, 2018 07:11
-
-
Save takuya/c92c5ffd2e0e62aa7d2b89042aa2adee to your computer and use it in GitHub Desktop.
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
require 'mechanize' | |
m = Mechanize.new | |
m.get 'http://t.co' | |
return if m.page.uri.to_s =~ %r'^https?://t.co' | |
m.page.forms[0].submit | |
m.page.form( :action=> /email/ ) | |
f = m.page.form( :action=> /email/ ) | |
f.field( :type => /mail/ ).value = 'yormail@example.com' | |
f.submit() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment