diff --git a/scrapers/itau_uy_scraper.rb b/scrapers/itau_uy_scraper.rb index ab5290b..f2e56ef 100644 --- a/scrapers/itau_uy_scraper.rb +++ b/scrapers/itau_uy_scraper.rb @@ -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."