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/>.
|
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import urllib
|
import urllib
|
||||||
import mechanize
|
from weboob.tools.browser import BaseBrowser, BrowserIncorrectPassword
|
||||||
from weboob.tools.browser import BaseBrowser
|
|
||||||
from weboob.capabilities.bill import Detail
|
from weboob.capabilities.bill import Detail
|
||||||
from decimal import *
|
from decimal import Decimal
|
||||||
from .pages import LoginPage, HomePage, AccountPage, HistoryPage, BillsPage
|
from .pages import LoginPage, HomePage, AccountPage, HistoryPage, BillsPage
|
||||||
|
|
||||||
__all__ = ['AmeliProBrowser']
|
__all__ = ['AmeliProBrowser']
|
||||||
|
|
||||||
|
|
||||||
class AmeliProBrowser(BaseBrowser):
|
class AmeliProBrowser(BaseBrowser):
|
||||||
PROTOCOL = 'https'
|
PROTOCOL = 'https'
|
||||||
DOMAIN = 'espacepro.ameli.fr'
|
DOMAIN = 'espacepro.ameli.fr'
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from decimal import Decimal
|
from decimal import Decimal
|
||||||
import re
|
import re
|
||||||
|
import urllib
|
||||||
from weboob.tools.browser import BasePage
|
from weboob.tools.browser import BasePage
|
||||||
from weboob.capabilities.bill import Subscription, Detail, Bill
|
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
|
# 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']
|
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):
|
class LoginPage(BasePage):
|
||||||
def login(self, login, password):
|
def login(self, login, password):
|
||||||
self.browser.select_form('connexionCompteForm')
|
self.browser.select_form('connexionCompteForm')
|
||||||
|
|
@ -37,6 +39,7 @@ class LoginPage(BasePage):
|
||||||
self.browser["vp_connexion_portlet_1password"] = password.encode('utf8')
|
self.browser["vp_connexion_portlet_1password"] = password.encode('utf8')
|
||||||
self.browser.submit()
|
self.browser.submit()
|
||||||
|
|
||||||
|
|
||||||
class HomePage(BasePage):
|
class HomePage(BasePage):
|
||||||
|
|
||||||
def on_loaded(self):
|
def on_loaded(self):
|
||||||
|
|
@ -57,6 +60,7 @@ class AccountPage(BasePage):
|
||||||
sub.subscriber = unicode(name)
|
sub.subscriber = unicode(name)
|
||||||
return sub
|
return sub
|
||||||
|
|
||||||
|
|
||||||
class HistoryPage(BasePage):
|
class HistoryPage(BasePage):
|
||||||
|
|
||||||
def iter_history(self):
|
def iter_history(self):
|
||||||
|
|
@ -80,6 +84,7 @@ class HistoryPage(BasePage):
|
||||||
det.price = Decimal(montant.replace(',', '.'))
|
det.price = Decimal(montant.replace(',', '.'))
|
||||||
yield det
|
yield det
|
||||||
|
|
||||||
|
|
||||||
class BillsPage(BasePage):
|
class BillsPage(BasePage):
|
||||||
|
|
||||||
def iter_bills(self):
|
def iter_bills(self):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue