Pep8 cleanup on freemobile module
This commit is contained in:
parent
1ae1f23c85
commit
dfb66a4fbd
5 changed files with 35 additions and 35 deletions
|
|
@ -36,8 +36,12 @@ class FreeMobileBackend(BaseBackend, ICapBill):
|
|||
VERSION = '0.b'
|
||||
LICENSE = 'AGPLv3+'
|
||||
DESCRIPTION = 'Free Mobile website'
|
||||
CONFIG = BackendConfig(ValueBackendPassword('login', label='Account ID', masked=False, regexp='^(\d{8}|)$'),
|
||||
ValueBackendPassword('password', label='Password')
|
||||
CONFIG = BackendConfig(ValueBackendPassword('login',
|
||||
label='Account ID',
|
||||
masked=False,
|
||||
regexp='^(\d{8}|)$'),
|
||||
ValueBackendPassword('password',
|
||||
label='Password')
|
||||
)
|
||||
BROWSER = Freemobile
|
||||
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ from weboob.capabilities.bill import Detail
|
|||
|
||||
__all__ = ['HistoryPage']
|
||||
|
||||
|
||||
def convert_price(div):
|
||||
try:
|
||||
price = div.find('div[@class="horsForfait"]/p/span').text
|
||||
|
|
@ -55,7 +56,6 @@ class HistoryPage(BasePage):
|
|||
divint = self.document.xpath('//div[@class="international hide"]')[0]
|
||||
self.iter_divs(divint.xpath('div[@class="detail"]'), True)
|
||||
|
||||
|
||||
def iter_divs(self, divs, inter=False):
|
||||
for div in divs:
|
||||
detail = Detail()
|
||||
|
|
@ -68,8 +68,6 @@ class HistoryPage(BasePage):
|
|||
|
||||
self.details.append(detail)
|
||||
|
||||
|
||||
|
||||
def get_calls(self):
|
||||
return self.calls
|
||||
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ from weboob.tools.browser import BasePage
|
|||
|
||||
__all__ = ['LoginPage']
|
||||
|
||||
|
||||
class FreeKeyboard(object):
|
||||
DEBUG = False
|
||||
symbols = {'0': '001111111111110011111111111111111111111111111110000000000011110000000000011111111111111111011111111111111001111111111110',
|
||||
|
|
@ -63,12 +64,11 @@ class FreeKeyboard(object):
|
|||
if self.DEBUG:
|
||||
image.save('/tmp/' + s + '.png')
|
||||
|
||||
|
||||
def get_symbol_code(self, digit):
|
||||
fingerprint = self.symbols[digit]
|
||||
i = 0
|
||||
for string in self.fingerprints:
|
||||
if string.__eq__(fingerprint):
|
||||
if string == fingerprint:
|
||||
return i
|
||||
i += 1
|
||||
# Image contains some noise, and the match is not always perfect
|
||||
|
|
@ -122,5 +122,3 @@ class LoginPage(BasePage):
|
|||
vk.get_small(code)
|
||||
self.browser['pwd_abo'] = password
|
||||
self.browser.submit(nologin=True)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue