diff --git a/modules/ameli/browser.py b/modules/ameli/browser.py index 246e63b0..336b0ce1 100755 --- a/modules/ameli/browser.py +++ b/modules/ameli/browser.py @@ -17,12 +17,10 @@ # You should have received a copy of the GNU Affero General Public License # along with weboob. If not, see . -import urllib -import mechanize from weboob.tools.browser import BaseBrowser, BrowserIncorrectPassword from weboob.capabilities.bill import Detail from decimal import Decimal -from .pages import AmeliBasePage, LoginPage, HomePage, AccountPage, LastPaymentsPage, PaymentDetailsPage, BillsPage +from .pages import LoginPage, HomePage, AccountPage, LastPaymentsPage, PaymentDetailsPage, BillsPage __all__ = ['AmeliBrowser'] diff --git a/modules/ameli/pages.py b/modules/ameli/pages.py index c650304e..30feded8 100755 --- a/modules/ameli/pages.py +++ b/modules/ameli/pages.py @@ -20,8 +20,8 @@ from datetime import datetime import re +import urllib from decimal import Decimal -import locale from weboob.tools.browser import BasePage from weboob.capabilities.bill import Subscription, Detail, Bill @@ -98,6 +98,7 @@ class PaymentDetailsPage(AmeliBasePage): id = sub._id + "." + datetime.strftime(id_date, "%Y%m%d") table = self.document.xpath('//table[@id="DetailPaiement3"]')[idx].xpath('.//tr') line = 1 + last_date = None for tr in table: tds = tr.xpath('.//td'); if len(tds) == 0: