Created
August 3, 2010 01:20
-
-
Save huacnlee/505662 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
# Ruby Mechanize 使用例子 | |
# 请先安装 mechanize | |
# $ sudo gem install mechanize | |
require "mechanize" | |
agent = WWW:Mechanize.new | |
page = agent.get("http://www.douban.com/login") | |
form = page.forms.first | |
form.form_username = '[email protected]' | |
form.form_password = '123123' | |
form.submit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment