The new woob repository is here: https://gitlab.com/woob/woob. This gitlab will be removed soon.

The new woob repository is here: https://gitlab.com/woob/woob. This gitlab will be removed soon.

Commit e65935c8 authored by Vincent Ardisson's avatar Vincent Ardisson Committed by Vincent A

[amelipro] harsh python3 port + cosmetics

parent 460a5e55
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
__all__ = ['AmeliProBrowser'] __all__ = ['AmeliProBrowser']
class AmeliProBrowser(LoginBrowser): class AmeliProBrowser(LoginBrowser):
BASEURL = 'https://espacepro.ameli.fr' BASEURL = 'https://espacepro.ameli.fr'
...@@ -63,7 +64,6 @@ def get_subscription_list(self): ...@@ -63,7 +64,6 @@ def get_subscription_list(self):
@need_login @need_login
def get_subscription(self, id): def get_subscription(self, id):
assert isinstance(id, basestring)
return self.get_subscription_list() return self.get_subscription_list()
@need_login @need_login
...@@ -101,7 +101,6 @@ def iter_documents(self): ...@@ -101,7 +101,6 @@ def iter_documents(self):
@need_login @need_login
def get_document(self, id): def get_document(self, id):
assert isinstance(id, basestring)
for b in self.iter_documents(): for b in self.iter_documents():
if id == b.id: if id == b.id:
return b return b
......
...@@ -21,8 +21,10 @@ ...@@ -21,8 +21,10 @@
from datetime import datetime from datetime import datetime
import re import re
from decimal import Decimal from decimal import Decimal
from weboob.browser.pages import HTMLPage from weboob.browser.pages import HTMLPage
from weboob.capabilities.bill import DocumentTypes, Subscription, Detail, Bill from weboob.capabilities.bill import DocumentTypes, Subscription, Detail, Bill
from weboob.tools.compat import unicode
# Ugly array to avoid the use of french locale # Ugly array to avoid the use of french locale
...@@ -36,14 +38,17 @@ def login(self, login, password): ...@@ -36,14 +38,17 @@ def login(self, login, password):
form['vp_connexion_portlet_1password'] = password.encode('utf8') form['vp_connexion_portlet_1password'] = password.encode('utf8')
form.submit() form.submit()
class HomePage(HTMLPage): class HomePage(HTMLPage):
def on_loaded(self): def on_loaded(self):
pass pass
class SearchPage(HTMLPage): class SearchPage(HTMLPage):
def on_loaded(self): def on_loaded(self):
pass pass
class AccountPage(HTMLPage): class AccountPage(HTMLPage):
def iter_subscription_list(self): def iter_subscription_list(self):
ident = self.doc.xpath('//div[@id="identification"]')[0] ident = self.doc.xpath('//div[@id="identification"]')[0]
......
...@@ -9,6 +9,7 @@ agendadulibre ...@@ -9,6 +9,7 @@ agendadulibre
allrecipes allrecipes
amazon amazon
ameli ameli
amelipro
americanexpress americanexpress
anticaptcha anticaptcha
amundi amundi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment