all browser2 modules may import exceptions from weboob.tools.exceptions
This commit is contained in:
parent
3e1dec519e
commit
e434bb90e2
14 changed files with 21 additions and 20 deletions
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
|
||||
from weboob.tools.browser2 import LoginBrowser, URL, need_login
|
||||
from weboob.tools.browser import BrowserIncorrectPassword
|
||||
from weboob.tools.exceptions import BrowserIncorrectPassword
|
||||
|
||||
from .pages import LoginPage, AccountsPage
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
|
||||
from weboob.tools.browser2 import LoginBrowser, need_login, URL
|
||||
from weboob.tools.browser import BrowserIncorrectPassword
|
||||
from weboob.tools.exceptions import BrowserIncorrectPassword
|
||||
|
||||
from .pages import LoginPage, IndexPage, AccountsPage, OperationsPage
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
|
||||
from weboob.tools.browser2 import LoginBrowser, URL, need_login
|
||||
from weboob.tools.browser import BrowserIncorrectPassword
|
||||
from weboob.tools.exceptions import BrowserIncorrectPassword
|
||||
|
||||
from .pages import LoginPage, HomePage, TransactionsPage
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ from weboob.capabilities.bank import Account, Transaction
|
|||
from weboob.tools.backend import BaseBackend, BackendConfig
|
||||
from weboob.tools.value import ValueBackendPassword
|
||||
from weboob.capabilities.base import NotAvailable
|
||||
from weboob.tools.browser import BrowserIncorrectPassword, BrokenPageError
|
||||
from weboob.tools.exceptions import BrowserIncorrectPassword, ParseError
|
||||
from weboob.tools.browser2 import BaseBrowser
|
||||
|
||||
from re import match, compile, sub
|
||||
|
|
@ -124,9 +124,9 @@ class CmbBackend(BaseBackend, ICapBank):
|
|||
tree = etree.parse(StringIO(data), parser)
|
||||
table = tree.xpath('/html/body/table')
|
||||
if len(table) == 0:
|
||||
raise BrokenPageError()
|
||||
raise ParseError()
|
||||
else:
|
||||
raise BrokenPageError()
|
||||
raise ParseError()
|
||||
|
||||
for tr in tree.xpath('/html/body//table[contains(@class, "Tb")]/tr'):
|
||||
if tr.get('class', None) not in ('LnTit', 'LnTot', 'LnMnTiers', None):
|
||||
|
|
@ -196,9 +196,9 @@ class CmbBackend(BaseBackend, ICapBank):
|
|||
tree = etree.parse(StringIO(data), parser)
|
||||
tables = tree.xpath('/html/body/table')
|
||||
if len(tables) == 0:
|
||||
raise BrokenPageError()
|
||||
raise ParseError()
|
||||
else:
|
||||
raise BrokenPageError()
|
||||
raise ParseError()
|
||||
|
||||
i = 0
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from weboob.tools.browser2 import LoginBrowser, URL, need_login
|
||||
from weboob.tools.browser import BrowserIncorrectPassword
|
||||
from weboob.tools.exceptions import BrowserIncorrectPassword
|
||||
from .pages import HomePage, LoginPage, HistoryPage, DetailsPage
|
||||
|
||||
__all__ = ['Freemobile']
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
|
||||
from weboob.tools.browser2 import LoginBrowser, URL, need_login
|
||||
from weboob.tools.browser import BrowserIncorrectPassword
|
||||
from weboob.tools.exceptions import BrowserIncorrectPassword
|
||||
|
||||
from .pages import LoginPage, LoginErrorPage, AvoirPage, OperationsTraiteesPage, OperationsFuturesPage
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ import ssl
|
|||
from datetime import timedelta
|
||||
|
||||
from weboob.tools.date import LinearDateGuesser
|
||||
from weboob.tools.browser import BrowserIncorrectPassword
|
||||
from weboob.tools.exceptions import BrowserIncorrectPassword
|
||||
from weboob.tools.browser2 import LoginBrowser, URL, need_login
|
||||
from .pages import AccountsPage, CBOperationPage, CPTOperationPage, LoginPage
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ from weboob.capabilities import NotAvailable
|
|||
from weboob.capabilities.bank import Account
|
||||
from weboob.tools.capabilities.bank.transactions import FrenchTransaction
|
||||
|
||||
from weboob.tools.browser import BrowserIncorrectPassword
|
||||
from weboob.tools.exceptions import BrowserIncorrectPassword
|
||||
from weboob.tools.browser2.page import HTMLPage, method, ListElement, ItemElement, SkipItem, LoggedPage, pagination
|
||||
from weboob.tools.browser2.filters import Filter, Env, CleanText, CleanDecimal, Link, Field, DateGuesser, TableCell
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
import hashlib
|
||||
|
||||
from weboob.tools.browser2 import LoginBrowser, URL, need_login
|
||||
from weboob.tools.browser import BrowserIncorrectPassword, BrokenPageError
|
||||
from weboob.tools.exceptions import BrowserIncorrectPassword, ParseError
|
||||
from weboob.capabilities.bank import Account, TransferError
|
||||
|
||||
from .pages import AccountsList, LoginPage, TitrePage, TitreHistory,\
|
||||
|
|
@ -162,7 +162,7 @@ class IngBrowser(LoginBrowser):
|
|||
self.valtransferpage.go()
|
||||
recap = self.page.recap()
|
||||
if len(list(recap)) == 0:
|
||||
raise BrokenPageError('Unable to find confirmation')
|
||||
raise ParseError('Unable to find confirmation')
|
||||
return self.page.recap()
|
||||
else:
|
||||
raise TransferError('Recipient not found')
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
from StringIO import StringIO
|
||||
|
||||
from weboob.tools.browser import BasePage, BrowserIncorrectPassword
|
||||
from weboob.tools.exceptions import BrowserIncorrectPassword
|
||||
from weboob.tools.captcha.virtkeyboard import VirtKeyboard
|
||||
from weboob.tools.browser2.page import HTMLPage
|
||||
|
||||
|
|
@ -120,5 +120,5 @@ class LoginPage(HTMLPage):
|
|||
form.submit()
|
||||
|
||||
|
||||
class StopPage(BasePage):
|
||||
class StopPage(HTMLPage):
|
||||
pass
|
||||
|
|
|
|||
|
|
@ -18,9 +18,10 @@
|
|||
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from weboob.tools.browser2 import LoginBrowser, URL, need_login
|
||||
from weboob.tools.browser import BrowserIncorrectPassword
|
||||
from weboob.tools.exceptions import BrowserIncorrectPassword
|
||||
from .pages import HomePage, LoginPage, HistoryPage, BillsPage, ErrorPage
|
||||
|
||||
|
||||
__all__ = ['PoivyBrowser']
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from weboob.tools.browser import BrowserBanned
|
||||
from weboob.tools.exceptions import BrowserBanned
|
||||
from weboob.tools.browser2.page import HTMLPage, LoggedPage, method, ListElement, ItemElement, pagination
|
||||
from weboob.tools.browser2.filters import CleanText, CleanDecimal, Field, Attr, DateTime, Link, Format
|
||||
from weboob.capabilities.bill import Subscription, Detail
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ from weboob.capabilities.bugtracker import ICapBugTracker, Issue, Project, User,
|
|||
Query, Change
|
||||
from weboob.capabilities.collection import ICapCollection, Collection, CollectionNotFound
|
||||
from weboob.tools.backend import BaseBackend, BackendConfig
|
||||
from weboob.tools.browser import BrowserHTTPNotFound
|
||||
from weboob.tools.exceptions import BrowserHTTPNotFound
|
||||
from weboob.tools.value import ValueBackendPassword, Value
|
||||
|
||||
from .browser import RedmineBrowser
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
import re
|
||||
|
||||
from weboob.tools.browser2 import DomainBrowser, HTMLPage, Profile
|
||||
from weboob.tools.browser import BrowserIncorrectPassword
|
||||
from weboob.tools.exceptions import BrowserIncorrectPassword
|
||||
from weboob.tools.json import json
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue