Ruby China
  • Topics
  • 招聘
  • Wiki
  • 酷站
  • Gems
  • Sign Up
  • Sign In
jin
@jt_today
Member
NO. 4241 / 2012-10-28

2 Topics / 2 Replies
0 Followers
0 Following
0 Favorites
No GitHub.
  • Overview
  • Topics
  • Replies
  • Favorites
  • Following
  • Followers
  • 用 mechanize 登录怎么处理跳转 at October 29, 2012

    用笨办法解决了……

    agent = Mechanize.new
    page = agent.get("https://example.com/login")
    login_form = page.forms.first
    login_form.username = 'username'
    login_form.password = 'password'
    agent.submit(login_form)
    page = agent.get("https://example.com/index.php")
    pp page
    

    但是还是不知道如何处理跳转

  • (Solved) 用 mechanize 出现问题。。似乎是 mechanize 没装对 at October 28, 2012

    把我的程序重命名一下似乎就好了。

关于 / RubyConf / Ruby 镜像 / RubyGems 镜像 / 活跃会员 / 组织 / API / 贡献者
由众多爱好者共同维护的 Ruby 中文社区,本站使用 Homeland 构建,并采用 Docker 部署。
服务器由 赞助 CDN 由 赞助
iOS 客户端 / Android 客户端 简体中文 / English