Getting your statement data out of the Co-operative Bank's online banking system in a usable form was pretty hard. You could save the HTML of a statement page, but that's about it. I use Xero for my company, Constituent Parts. It will import OFX formatted files which some banks will export for you. To get Co-operative Bank data into Xero you either need to enter the data by hand, or somehow convert it to OFX. Luke Redpath (who's great, by the way) wrote a Greasemonkey script to crape Smile/Co-op HTML and generate OFX. It works for Current Accounts, but doesn't work with Credit Card statements, which have a slightly (but significantly) different format. So, I've written a Ruby-based screen scraper which will work with Current Accounts and Credit Cards. You can find it over on GitHub: It's called Co-op to OFX.
Installing it's easy (if you have Ruby and Rubygems installed already):
# If you haven't already done this:
gem sources -a http://gems.github.com
sudo gem install fidothe-coop_to_ofx
# And if you don't want to add GitHub as a source permanently
sudo gem install fidothe-coop_to_ofx --source=http://gems.github.com
Using it's also easy:
First, download a statement (say a current account one) from the Co-op by going to a statement on their site in your browser and doing "Save as" to save it as HTML (HTML only, not a web archive or anything like that).
Then, from the command line, do:
coop_to_ofx --current /path/to/statement.html
That's it. The script will generate an OFX file called statement.ofx in the same directory as the statement HTML.
If you want OFX 1 (some things won't accept the newer XML-based OFX 2) then:
coop_to_ofx --ofx1 --current /path/to/statement.html
And, for Credit Card statements:
coop_to_ofx /path/to/credit_card_statement.html
coop_to_ofx --ofx1 /path/to/credit_card_statement.html
The script works locally, on saved HTML, and doesn't ever access the web: It feels unnecessary, brittle, and more of a security risk to deal with the security on the site. On balance, I think it's much better all round to just get you to download the HTML yourself.
Anyway, I hope some of you find it useful.