diff --git a/modules/cragr/web/pages.py b/modules/cragr/web/pages.py index e61c497f..36d5b9fd 100644 --- a/modules/cragr/web/pages.py +++ b/modules/cragr/web/pages.py @@ -302,8 +302,12 @@ class TransactionsPage(Page): t = Transaction(i) + col_text = cols[self.COL_TEXT] + if len(col_text.xpath('.//br')) == 0: + col_text = cols[self.COL_TEXT+1] + + raw = self.parser.tocleanstring(col_text) date = self.parser.tocleanstring(cols[self.COL_DATE]) - raw = self.parser.tocleanstring(cols[self.COL_TEXT]) credit = self.parser.tocleanstring(cols[self.COL_CREDIT]) if self.COL_DEBIT is not None: debit = self.parser.tocleanstring(cols[self.COL_DEBIT]) @@ -315,10 +319,6 @@ class TransactionsPage(Page): t.rdate = t.date t.raw = raw - col_text = cols[self.COL_TEXT] - if len(col_text.xpath('.//br')) == 0: - col_text = cols[self.COL_TEXT+1] - # On some accounts' history page, there is a tag in columns. if col_text.find('font') is not None: col_text = col_text.find('font')