Skip to content

Instantly share code, notes, and snippets.

@takuya
Created May 24, 2015 09:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save takuya/b32f74ecb54f12f81ae5 to your computer and use it in GitHub Desktop.
Save takuya/b32f74ecb54f12f81ae5 to your computer and use it in GitHub Desktop.
#!/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