From 28a4569c992b27929f93f4e30b596a55f419bf9b Mon Sep 17 00:00:00 2001 From: Oleg Plakhotniuk Date: Thu, 26 Mar 2015 22:20:03 -0500 Subject: [PATCH] [wellsfargo] Scrape minimum credit card payment and due date. Closes #1809 --- modules/wellsfargo/pages.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/modules/wellsfargo/pages.py b/modules/wellsfargo/pages.py index e4b462f4..7c23af16 100644 --- a/modules/wellsfargo/pages.py +++ b/modules/wellsfargo/pages.py @@ -262,10 +262,13 @@ class ActivityCardPage(ActivityPage): return datetime.datetime.now() + datetime.timedelta(days=999), \ Decimal(0) else: - # TODO: Parse payment date and amount. - # Oleg: Currently I don't have any accounts with scheduled - # payments, so I have to wait for a while... - return None, None + date = self.doc.xpath(u'//span[contains(text(),"Minimum Payment")]' + '/span/text()')[0] + date = re.match(u'.*(../../..).*', date).group(1) + date = datetime.datetime.strptime(date, '%m/%d/%y') + amount = self.doc.xpath(u'//td[@headers="minimumPaymentDue"]' + '//text()')[0].strip() + return date, AmTr.decimal_amount(amount) def get_account(self): account = ActivityPage.get_account(self)