pyflakes/pep8 cleaning
This commit is contained in:
parent
1fd0cb1291
commit
2a7f373168
3 changed files with 13 additions and 8 deletions
|
|
@ -18,14 +18,14 @@
|
|||
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import urllib
|
||||
import mechanize
|
||||
from weboob.tools.browser import BaseBrowser
|
||||
from weboob.tools.browser import BaseBrowser, BrowserIncorrectPassword
|
||||
from weboob.capabilities.bill import Detail
|
||||
from decimal import *
|
||||
from decimal import Decimal
|
||||
from .pages import LoginPage, HomePage, AccountPage, HistoryPage, BillsPage
|
||||
|
||||
__all__ = ['AmeliProBrowser']
|
||||
|
||||
|
||||
class AmeliProBrowser(BaseBrowser):
|
||||
PROTOCOL = 'https'
|
||||
DOMAIN = 'espacepro.ameli.fr'
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
from datetime import datetime
|
||||
from decimal import Decimal
|
||||
import re
|
||||
import urllib
|
||||
from weboob.tools.browser import BasePage
|
||||
from weboob.capabilities.bill import Subscription, Detail, Bill
|
||||
|
||||
|
|
@ -30,6 +31,7 @@ __all__ = ['LoginPage', 'HomePage', 'AccountPage', 'HistoryPage', 'BillsPage']
|
|||
# Ugly array to avoid the use of french locale
|
||||
FRENCH_MONTHS = [u'janvier', u'février', u'mars', u'avril', u'mai', u'juin', u'juillet', u'août', u'septembre', u'octobre', u'novembre', u'décembre']
|
||||
|
||||
|
||||
class LoginPage(BasePage):
|
||||
def login(self, login, password):
|
||||
self.browser.select_form('connexionCompteForm')
|
||||
|
|
@ -37,6 +39,7 @@ class LoginPage(BasePage):
|
|||
self.browser["vp_connexion_portlet_1password"] = password.encode('utf8')
|
||||
self.browser.submit()
|
||||
|
||||
|
||||
class HomePage(BasePage):
|
||||
|
||||
def on_loaded(self):
|
||||
|
|
@ -57,6 +60,7 @@ class AccountPage(BasePage):
|
|||
sub.subscriber = unicode(name)
|
||||
return sub
|
||||
|
||||
|
||||
class HistoryPage(BasePage):
|
||||
|
||||
def iter_history(self):
|
||||
|
|
@ -80,6 +84,7 @@ class HistoryPage(BasePage):
|
|||
det.price = Decimal(montant.replace(',', '.'))
|
||||
yield det
|
||||
|
||||
|
||||
class BillsPage(BasePage):
|
||||
|
||||
def iter_bills(self):
|
||||
|
|
|
|||
Loading…
Reference in a new issue