Skip to content

Commit

Permalink
Don't include today's transactions on itau scraper
Browse files Browse the repository at this point in the history
  • Loading branch information
oboxodo committed Nov 17, 2010
1 parent 2adde6c commit 1d47bca
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions scrapers/itau_uy_scraper.rb
Expand Up @@ -120,8 +120,13 @@ def parse_transactions_page(transactions_page)
# the new balance is in the last column
transaction.new_balance = data[4].tr('.', '').tr(',', '.')

# add thew new transaction to the array
statement.add_transaction(transaction)
# Don't include today's transactions as the time faking would
# produce different transaction times when regenerated in the future.
# Not including today is not a big problem.
unless transaction.date.strftime("%Y%m%d") == Date.today.strftime("%Y%m%d")
# add thew new transaction to the array
statement.add_transaction(transaction)
end
end
rescue => exception
msg = "Failed to parse the transactions page at due to exception: #{exception.message}\nCheck your user name and password."
Expand Down

0 comments on commit 1d47bca

Please sign in to comment.