WezM.net The weblog of Wesley Moore

18Jul/091

Scraping NAB Internet Banking with Mechanize

This week I wanted to write a script that would get my account balances from nab Internet Banking. These types of things are generally quite simple with Ruby and Mechanize. I got the basics of the script up and running fairly quickly but when I ran it the site always rejected my username and password.

After a lot more time in the Safari Web Inspector I finally worked out that the site actually expects the password submitted to the login page to be ‘mixed’ with a key that is unique for each page load. The ‘mixing’ (for lack of a better description) is performed by a javascript function. After I reimplemented this function in my Ruby script I was then able to sucessfully login and retrieve my account balances. My code is supplied below for anyone else who is wanting to do something like this.

28Jun/090

VirtualBox News Atom Feed

A few days ago I decided I wanted a feed of the VirtualBox News page. I mainly wanted this to know when new releases are made. Whilst the application does update itself, sometimes I go a while without firing it up so seeing the release in Fever would be nice.

After some brief Googling I didn’t come across anything that was obviously designed to create feeds from Ruby (outside of Rails). So I opened up the Atom Feed spec and built the feed manually. The end result is a Ruby script and a feed (updated daily) at: http://home.wezm.net/files/virtualbox.atom. Thanks to the brilliant nokogiri this was relatively straightforward.

My script is below:

28May/081

To Title Case Bookmarklet

I’ve make a bookmarklet out of David Gouch’s Javascript implementation of John Gruber’s Title Case Perl script.

Drag this link to your bookmarks bar: Title Case

Seems to work ok in Firefox, IE 6 has issues.

   

Recent Comments

Categories

Links

Archives

Tags

adaptive atom awk bash benchmark books cake consolas core-audio debian decoder delivery expand feed font fonts git glob gripe installer iPhone ipod Linux mad melbourne microsoft mp3 mpg123 music package pocket-reference rss ruby script sed shell smoothing snow-leopard textmate title tux UNIX uri-scheme variable virtualbox

Meta

Contact