From: "M. Edward (Ed) Borasky" Date: 2006-06-19T22:17:48+09:00 Subject: Re: Looking for Mechanize code for login There's a much easier way ... buy Quicken :). Or reverse-engineer Gnucash, if it works with your bank. :) Alex Young wrote: > Jim Freeze wrote: >> Hi >> >> I am trying to automate collecting balances from my bank using >> Mechanize. >> I have set >> >> #!/usr/bin/env ruby >> >> require 'rubygems' >> require 'mechanize' >> require 'pp' >> >> username = "*****" >> password = "****" >> >> site_url = "https://online.compassweb.com/servlet/compass/login.jsp" >> agent = WWW::Mechanize.new >> page = agent.get(site_url) >> form = page.forms.first >> form.fields.name("UserName").value = username >> form.fields.name("Password").value = password >> page = agent.submit(form, form.buttons.first) >> >> The page I get back has the following in it: >> >> >> >> >> >> Can someone tell me what the process is for retrieving pages like >> this are? > If that's all you ever get back, I'd say to first do the login to get > the cookies, check that you get what you're expecting back, then just > directly agent.get that url. > -- M. Edward (Ed) Borasky http://linuxcapacityplanning.com