Rename BasePage to Page
This commit is contained in:
parent
44dffce7b2
commit
444d36eee8
146 changed files with 525 additions and 525 deletions
|
|
@ -24,7 +24,7 @@ from datetime import datetime
|
|||
import re
|
||||
|
||||
from weboob.capabilities.bank import Account
|
||||
from weboob.tools.browser import BasePage, BrokenPageError
|
||||
from weboob.tools.browser import Page, BrokenPageError
|
||||
from weboob.tools.capabilities.bank.transactions import FrenchTransaction
|
||||
from weboob.tools.captcha.virtkeyboard import MappedVirtKeyboard, VirtKeyboardError
|
||||
from weboob.tools.misc import to_unicode
|
||||
|
|
@ -50,7 +50,7 @@ class Transaction(FrenchTransaction):
|
|||
]
|
||||
|
||||
|
||||
class BEPage(BasePage):
|
||||
class BEPage(Page):
|
||||
def get_error(self):
|
||||
for title in self.document.xpath('/html/head/title'):
|
||||
if 'erreur' in title.text or 'error' in title.text:
|
||||
|
|
|
|||
|
|
@ -24,10 +24,10 @@ from decimal import Decimal
|
|||
from weboob.tools.capabilities.bank.transactions import FrenchTransaction
|
||||
from weboob.capabilities.bank import Account
|
||||
from weboob.capabilities.base import NotAvailable
|
||||
from weboob.tools.browser import BasePage, BrokenPageError, BrowserPasswordExpired
|
||||
from weboob.tools.browser import Page, BrokenPageError, BrowserPasswordExpired
|
||||
|
||||
|
||||
class AccountsList(BasePage):
|
||||
class AccountsList(Page):
|
||||
ACCOUNT_TYPES = {
|
||||
u'Liquidités': Account.TYPE_CHECKING,
|
||||
u'Epargne disponible': Account.TYPE_SAVINGS,
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ import time
|
|||
import re
|
||||
import urllib
|
||||
|
||||
from weboob.tools.browser import BasePage, BrowserUnavailable
|
||||
from weboob.tools.browser import Page, BrowserUnavailable
|
||||
from weboob.tools.captcha.virtkeyboard import VirtKeyboard, VirtKeyboardError
|
||||
|
||||
|
||||
|
|
@ -72,7 +72,7 @@ class BNPVirtKeyboard(VirtKeyboard):
|
|||
return code
|
||||
|
||||
|
||||
class LoginPage(BasePage):
|
||||
class LoginPage(Page):
|
||||
def on_loaded(self):
|
||||
for td in self.document.getroot().cssselect('td.LibelleErreur'):
|
||||
if td.text is None:
|
||||
|
|
@ -101,7 +101,7 @@ class LoginPage(BasePage):
|
|||
self.browser.location(url, urllib.urlencode(params))
|
||||
|
||||
|
||||
class ConfirmPage(BasePage):
|
||||
class ConfirmPage(Page):
|
||||
def get_error(self):
|
||||
for td in self.document.xpath('//td[@class="hdvon1"]'):
|
||||
if td.text:
|
||||
|
|
@ -115,12 +115,12 @@ class ConfirmPage(BasePage):
|
|||
return m.group(1)
|
||||
|
||||
|
||||
class InfoMessagePage(BasePage):
|
||||
class InfoMessagePage(Page):
|
||||
def on_loaded(self):
|
||||
pass
|
||||
|
||||
|
||||
class ChangePasswordPage(BasePage):
|
||||
class ChangePasswordPage(Page):
|
||||
def change_password(self, current, new):
|
||||
try:
|
||||
vk=BNPVirtKeyboard(self)
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
from weboob.tools.browser import BasePage, BrokenPageError
|
||||
from weboob.tools.browser import Page, BrokenPageError
|
||||
from weboob.capabilities.messages import Message, Thread
|
||||
from weboob.capabilities.base import NotLoaded
|
||||
from weboob.tools.capabilities.messages.genericArticle import try_drop_tree
|
||||
|
|
@ -29,7 +29,7 @@ from datetime import datetime
|
|||
from lxml.html import make_links_absolute
|
||||
|
||||
|
||||
class MessagesPage(BasePage):
|
||||
class MessagesPage(Page):
|
||||
def iter_threads(self):
|
||||
table = self.parser.select(self.document.getroot(), 'table#listeMessages', 1)
|
||||
for tr in table.xpath('./tr'):
|
||||
|
|
@ -61,7 +61,7 @@ class MessagesPage(BasePage):
|
|||
yield thread
|
||||
|
||||
|
||||
class MessagePage(BasePage):
|
||||
class MessagePage(Page):
|
||||
def get_content(self):
|
||||
"""
|
||||
Get the message content.
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
import re
|
||||
|
||||
from weboob.tools.browser import BasePage
|
||||
from weboob.tools.browser import Page
|
||||
from weboob.tools.capabilities.bank.transactions import FrenchTransaction
|
||||
|
||||
|
||||
|
|
@ -48,7 +48,7 @@ class Transaction(FrenchTransaction):
|
|||
]
|
||||
|
||||
|
||||
class AccountHistory(BasePage):
|
||||
class AccountHistory(Page):
|
||||
def iter_operations(self):
|
||||
for tr in self.document.xpath('//table[@id="tableCompte"]//tr'):
|
||||
if len(tr.xpath('td[@class="debit"]')) == 0:
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
import re
|
||||
|
||||
from weboob.tools.browser import BasePage, BrowserPasswordExpired
|
||||
from weboob.tools.browser import Page, BrowserPasswordExpired
|
||||
from weboob.tools.ordereddict import OrderedDict
|
||||
from weboob.capabilities.bank import TransferError
|
||||
|
||||
|
|
@ -33,7 +33,7 @@ class Account(object):
|
|||
self.receive_checkbox = receive_checkbox
|
||||
|
||||
|
||||
class TransferPage(BasePage):
|
||||
class TransferPage(Page):
|
||||
def on_loaded(self):
|
||||
for td in self.document.xpath('//td[@class="hdvon1"]'):
|
||||
if td.text and 'Vous avez atteint le seuil de' in td.text:
|
||||
|
|
@ -88,7 +88,7 @@ class TransferPage(BasePage):
|
|||
self.browser.submit()
|
||||
|
||||
|
||||
class TransferConfirmPage(BasePage):
|
||||
class TransferConfirmPage(Page):
|
||||
def on_loaded(self):
|
||||
for td in self.document.getroot().cssselect('td#size2'):
|
||||
raise TransferError(td.text.strip())
|
||||
|
|
@ -100,6 +100,6 @@ class TransferConfirmPage(BasePage):
|
|||
return
|
||||
|
||||
|
||||
class TransferCompletePage(BasePage):
|
||||
class TransferCompletePage(Page):
|
||||
def get_id(self):
|
||||
return self.group_dict['id']
|
||||
|
|
|
|||
|
|
@ -24,12 +24,12 @@ from decimal import Decimal, InvalidOperation
|
|||
|
||||
from weboob.capabilities import NotAvailable
|
||||
from weboob.capabilities.bank import Account
|
||||
from weboob.tools.browser import BasePage
|
||||
from weboob.tools.browser import Page
|
||||
|
||||
from .perso.transactions import Transaction
|
||||
|
||||
|
||||
class ProAccountsList(BasePage):
|
||||
class ProAccountsList(Page):
|
||||
COL_LABEL = 1
|
||||
COL_ID = 2
|
||||
COL_BALANCE = 3
|
||||
|
|
@ -77,7 +77,7 @@ class ProAccountsList(BasePage):
|
|||
return accounts
|
||||
|
||||
|
||||
class ProAccountHistory(BasePage):
|
||||
class ProAccountHistory(Page):
|
||||
COL_DATE = 0
|
||||
COL_LABEL = 1
|
||||
COL_DEBIT = -2
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue