Created
May 24, 2015 09:28
-
-
Save takuya/b32f74ecb54f12f81ae5 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
#!/usr/bin/env ruby | |
# | |
require 'mechanize' | |
m = Mechanize.new | |
m.user_agent = "SoftBank/2.0/004SH/SHJ001/SN 12345678901 Browser/NetFront/3.5 Profile/MIDP-2.0 Configuration/CLDC-1.1" | |
m.get "https://plogin1.pub.w-lan.jp/wrs?i=074&v=100" | |
f = m.page.form_with(:action => /wrslogin/ ) | |
f.field_with(:name=>/SWSUserName/).value="08098764321" ##11桁電話番号 | |
f.field_with(:name=>/SWSPassword/).value="1234" ##4桁暗証番号 | |
btn = f.button_with(:type=>/submit/i) | |
m.submit(f,btn) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment