Rename BasePage to Page
This commit is contained in:
parent
44dffce7b2
commit
444d36eee8
146 changed files with 525 additions and 525 deletions
|
|
@ -22,11 +22,11 @@
|
|||
from decimal import Decimal
|
||||
|
||||
from weboob.capabilities.bank import Account
|
||||
from weboob.tools.browser import BasePage, BrowserPasswordExpired
|
||||
from weboob.tools.browser import Page, BrowserPasswordExpired
|
||||
from weboob.tools.json import json
|
||||
|
||||
|
||||
class AccountsList(BasePage):
|
||||
class AccountsList(Page):
|
||||
ACCOUNT_TYPES = {
|
||||
1: Account.TYPE_CHECKING,
|
||||
2: Account.TYPE_SAVINGS,
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
import time
|
||||
import re
|
||||
|
||||
from weboob.tools.browser import BasePage, BrowserUnavailable
|
||||
from weboob.tools.browser import Page, BrowserUnavailable
|
||||
from weboob.tools.captcha.virtkeyboard import VirtKeyboard, VirtKeyboardError
|
||||
|
||||
|
||||
|
|
@ -70,7 +70,7 @@ class HelloBankVirtKeyboard(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:
|
||||
|
|
@ -93,7 +93,7 @@ class LoginPage(BasePage):
|
|||
self.browser.submit()
|
||||
|
||||
|
||||
class ConfirmPage(BasePage):
|
||||
class ConfirmPage(Page):
|
||||
def get_error(self):
|
||||
for td in self.document.xpath('//td[@class="hdvon1"]'):
|
||||
if td.text:
|
||||
|
|
@ -107,6 +107,6 @@ class ConfirmPage(BasePage):
|
|||
return m.group(1)
|
||||
|
||||
|
||||
class InfoMessagePage(BasePage):
|
||||
class InfoMessagePage(Page):
|
||||
def on_loaded(self):
|
||||
pass
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
import re
|
||||
|
||||
from weboob.tools.browser import BasePage
|
||||
from weboob.tools.browser import Page
|
||||
from weboob.tools.capabilities.bank.transactions import FrenchTransaction
|
||||
|
||||
|
||||
|
|
@ -45,7 +45,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:
|
||||
|
|
|
|||
|
|
@ -21,7 +21,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
|
||||
|
||||
|
|
@ -34,7 +34,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:
|
||||
|
|
@ -91,7 +91,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())
|
||||
|
|
@ -103,6 +103,6 @@ class TransferConfirmPage(BasePage):
|
|||
return
|
||||
|
||||
|
||||
class TransferCompletePage(BasePage):
|
||||
class TransferCompletePage(Page):
|
||||
def get_id(self):
|
||||
return self.group_dict['id']
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue