Skip to content

Instantly share code, notes, and snippets.

@brapse
Created July 20, 2009 19:10
Show Gist options
  • Save brapse/150537 to your computer and use it in GitHub Desktop.
Save brapse/150537 to your computer and use it in GitHub Desktop.
Hipdoop::adapt(:name => "National City", :cert => 6557) do
url = 'http://www.nationalcityhomeloans.com/QuickRates/QuickRates.aspx?AppType=1&LoanAmount=250000&ZipCode=90210'
document = fetch_document(url)
table = Hipdoop::Table.new('table.rateSection:nth(0)', document)
emit 'FIXED-10', table[2][1], :ltv_max => 0.75
emit 'FIXED-15', table[3][1], :ltv_max => 0.75
emit 'FIXED-20', table[4][1], :ltv_max => 0.75
emit 'FIXED-30', table[5][1], :ltv_max => 0.75
table = Hipdoop::Table.new('table.rateSection:nth(4)', document)
emit 'ARM-1', table[2][1], :ltv_max => 0.75
emit 'ARM-3', table[3][1], :ltv_max => 0.75
emit 'ARM-5', table[4][1], :ltv_max => 0.75
emit 'ARM-7', table[5][1], :ltv_max => 0.75
emit 'ARM-10', table[6][1], :ltv_max => 0.75
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment