Mon 17 Oct 2005
I put together a little Ruby script adapted from a smaller script I saw somewhere on getting the balance of your Wells Fargo accounts. You can download it and use it.
You may also find the GeekTool script I put together useful. Display your account balance on your desktop, refreshed as frequently as you want!
/path/to/ruby <<"EOF"
require '~/lib/wells_fargo.rb'
s = WellsFargo::Session.new
s.login 'myssn', 'mypassword'
balance = s.extract_total(s.page.body)
s.logout
if balance.nil?
puts "Could not get balance"
File.open(File.expand_path('~/.wells_fargo_page.html'), 'w') do |f|
f.write s.page.body
end
else
puts "Wells Fargo Balance: $" + balance.to_s
end
EOF
November 1st, 2005 at 21.30
the script doesn’t work for me on windows. gives me this error.
November 9th, 2005 at 16.07
Sounds like it’s not getting the Signon form correctly. If you fix it for you let me know what you had to change.
November 27th, 2006 at 00.37
Fixed it to work for me. Here are my patches:
> diff wellsfargo.txt wellsfargo.rb
16c16,18
#return $1.gsub(/,/, ‘’).tof if html =~ / # patched to catch negative balance -bb
> return $1.gsub(/[,$]/, ‘’).tof if html =~ / # @page = @agent.get(’https://online.wellsfargo.com/’)
> # patched to get new signon -bb
> @page = @agent.get(’https://online.wellsfargo.com/signon’)
23c27,30
> # form = page.forms.find {|f| f.name == ‘Signon’}
> # patched to use correct variable (@page, not page)
> form = @page.forms.find {|f| f.name == ‘Signon’}
29c36,38
# @page.body =~ /META.?Refresh.?URL=(.?)”/
> # patched to catch new redirect syntax -bb
> @page.body =~ /META.?URL=(.*?)”/i
January 6th, 2007 at 13.50
Hi, I remembered I did fix this problem without your patch a long time ago, but now I want to use it again. Neways, can you show me how to apply this patch that you posted? Thanks.