Commit a019819f authored by Florent Fourcot's avatar Florent Fourcot

Move browser2 from weboob/tools/b2 to weboob/browser2

parent 990bb056
......@@ -65,7 +65,7 @@ In a module directory, there are commonly these files:
* **__init__.py** - needed in every python modules, it exports your :class:`Module <weboob.tools.backend.Module>` class.
* **module.py** - defines the main class of your module, which derives :class:`Module <weboob.tools.backend.Module>`.
* **browser.py** - your browser, derived from :class:`Browser <weboob.tools.browser2.browser.Browser>`, is called by your module to interact with the supported website.
* **browser.py** - your browser, derived from :class:`Browser <weboob.browser2.browser.Browser>`, is called by your module to interact with the supported website.
* **pages.py** - all website's pages handled by the browser are defined here
* **test.py** - functional tests
* **favicon.png** - a 64x64 transparent PNG icon
......@@ -179,14 +179,14 @@ what are expected returned objects, and what exceptions it may raises.
Browser
*******
Most of modules use a class derived from :class:`PagesBrowser <weboob.tools.browser2.page.PagesBrowser>` or
:class:`LoginBrowser <weboob.tools.browser2.page.LoginBrowser>` (for authenticated websites) to interact with a website.
Most of modules use a class derived from :class:`PagesBrowser <weboob.browser2.page.PagesBrowser>` or
:class:`LoginBrowser <weboob.browser2.page.LoginBrowser>` (for authenticated websites) to interact with a website.
Edit ``browser.py``::
# -*- coding: utf-8 -*-
from weboob.tools.browser2 import PagesBrowser
from weboob.browser2 import PagesBrowser
__all__ = ['ExampleBrowser']
......@@ -195,7 +195,7 @@ Edit ``browser.py``::
There are several possible class attributes:
* **BASEURL** - base url of website used for absolute paths given to :class:`open() <weboob.tools.browser2.page.PagesBrowser.open>` or :class:`location() <weboob.tools.browser2.page.PagesBrowser.location>`
* **BASEURL** - base url of website used for absolute paths given to :class:`open() <weboob.browser2.page.PagesBrowser.open>` or :class:`location() <weboob.browser2.page.PagesBrowser.location>`
* **PROFILE** - defines the behavior of your browser against the website. By default this is Firefox, but you can import other profiles
* **TIMEOUT** - defines the timeout for requests (defaults to 10 seconds)
* **VERIFY** - SSL verification (if the protocol used is **https**)
......@@ -205,15 +205,15 @@ Pages
For each page you want to handle, you have to create an associated class derived from one of these classes:
* :class:`HTMLPage <weboob.tools.browser2.page.HTMLPage>` - a HTML page
* :class:`XMLPage <weboob.tools.browser2.page.XMLPage>` - a XML document
* :class:`JsonPage <weboob.tools.browser2.page.JsonPage>` - a Json object
* :class:`HTMLPage <weboob.browser2.page.HTMLPage>` - a HTML page
* :class:`XMLPage <weboob.browser2.page.XMLPage>` - a XML document
* :class:`JsonPage <weboob.browser2.page.JsonPage>` - a Json object
In the file ``pages.py``, you can write, for example::
# -*- coding: utf-8 -*-
from weboob.tools.browser2.page import HTMLPage
from weboob.browser2.page import HTMLPage
__all__ = ['IndexPage', 'ListPage']
......@@ -227,9 +227,9 @@ In the file ``pages.py``, you can write, for example::
``IndexPage`` is the class we will use to get information from the home page of the website, and ``ListPage`` will handle pages
which list accounts.
Then, you have to declare them in your browser, with the :class:`URL <weboob.tools.browser2.page.URL>` object::
Then, you have to declare them in your browser, with the :class:`URL <weboob.browser2.page.URL>` object::
from weboob.tools.browser2.page import PagesBrowser, URL
from weboob.browser2.page import PagesBrowser, URL
from .pages import IndexPage, ListPage
# ...
......@@ -257,9 +257,9 @@ For example, we can now implement some methods in ``ExampleBrowser``::
return self.page.iter_accounts_list()
When calling the :func:`go() <weboob.tools.browser2.page.URL.go>` method, it reads the first regexp url of our :class:`URL <weboob.tools.browser2.page.URL>` object, and go on the page.
When calling the :func:`go() <weboob.browser2.page.URL.go>` method, it reads the first regexp url of our :class:`URL <weboob.browser2.page.URL>` object, and go on the page.
:func:`stay_or_go() <weboob.tools.browser2.page.URL.stay_or_go>` is used when you want to relocate on the page only if we aren't already on it.
:func:`stay_or_go() <weboob.browser2.page.URL.stay_or_go>` is used when you want to relocate on the page only if we aren't already on it.
Once we are on the ``ListPage``, we can call every methods of the ``page`` object.
......@@ -295,8 +295,8 @@ the method :func:`create_default_browser <weboob.tools.backend.Module.create_def
def create_default_browser(self):
return self.create_browser(self.config['username'].get(), self.config['password'].get())
On the browser side, you need to inherit from :func:`LoginBrowser <weboob.tools.browser2.page.LoginBrowser>` and to implement the function
:func:`do_login <weboob.tools.browser2.page.LoginBrowser.do_login>`::
On the browser side, you need to inherit from :func:`LoginBrowser <weboob.browser2.page.LoginBrowser>` and to implement the function
:func:`do_login <weboob.browser2.page.LoginBrowser.do_login>`::
class ExampleBrowser(LoginBrowser):
login = URL('/login', LoginPage)
......@@ -319,7 +319,7 @@ Also, your ``LoginPage`` may look like::
form['password'] = password
form.submit()
Then, each method on your browser which need your user to be authenticated may be decorated by :func:`need_login <weboob.tools.browser2.page.need_login>`::
Then, each method on your browser which need your user to be authenticated may be decorated by :func:`need_login <weboob.browser2.page.need_login>`::
class ExampleBrowser(LoginBrowser):
accounts = URL('/accounts$', ListPage)
......@@ -329,9 +329,9 @@ Then, each method on your browser which need your user to be authenticated may b
self.accounts.stay_or_go()
return self.page.get_accounts()
The last thing to know is that :func:`need_login <weboob.tools.browser2.page.need_login>` checks if the current page is a logged one by
reading the attribute :func:`logged <weboob.tools.browser2.page.Page.logged>` of the instance. You can either define it yourself, as a
class boolean attribute or as a property, or to inherit your class from :class:`LoggedPage <weboob.tools.browser2.page.LoggedPage>`.
The last thing to know is that :func:`need_login <weboob.browser2.page.need_login>` checks if the current page is a logged one by
reading the attribute :func:`logged <weboob.browser2.page.Page.logged>` of the instance. You can either define it yourself, as a
class boolean attribute or as a property, or to inherit your class from :class:`LoggedPage <weboob.browser2.page.LoggedPage>`.
Parsing of pages
......@@ -342,7 +342,7 @@ Parsing of pages
When your browser locates on a page, an instance of the class related to the
:class:`URL <weboob.tools.browser2.page.URL>` attribute which matches the url
:class:`URL <weboob.browser2.page.URL>` attribute which matches the url
is created. You can declare methods on your class to allow your browser to
interact with it.
......
......@@ -18,7 +18,7 @@
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
from weboob.tools.browser2 import PagesBrowser, URL
from weboob.browser2 import PagesBrowser, URL
from .pages import EventListPage, EventPage
from datetime import timedelta, date
......
......@@ -17,10 +17,10 @@
# 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.browser2.page import HTMLPage, method, pagination
from weboob.tools.browser2.elements import ItemElement, ListElement
from weboob.tools.browser2.filters.standard import Regexp, CleanText, DateTime, Filter, Type, Env, Format, CombineDate
from weboob.tools.browser2.filters.html import Link, XPath, CleanHTML
from weboob.browser2.page import HTMLPage, method, pagination
from weboob.browser2.elements import ItemElement, ListElement
from weboob.browser2.filters.standard import Regexp, CleanText, DateTime, Filter, Type, Env, Format, CombineDate
from weboob.browser2.filters.html import Link, XPath, CleanHTML
from .calendar import AgendaDuLibreCalendarEvent
from datetime import time, datetime, date
......
......@@ -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.browser2 import LoginBrowser, URL, need_login
from weboob.tools.exceptions import BrowserIncorrectPassword
from .pages import LoginPage, AccountsPage
......
......@@ -21,9 +21,9 @@
import datetime
from decimal import Decimal
from weboob.tools.browser2.page import HTMLPage, LoggedPage, method
from weboob.tools.browser2.elements import ItemElement
from weboob.tools.browser2.filters.standard import CleanDecimal, CleanText, Filter, TableCell
from weboob.browser2.page import HTMLPage, LoggedPage, method
from weboob.browser2.elements import ItemElement
from weboob.browser2.filters.standard import CleanDecimal, CleanText, Filter, TableCell
from weboob.capabilities.bank import Account
from weboob.tools.capabilities.bank.transactions import FrenchTransaction as Transaction
......
......@@ -18,7 +18,7 @@
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
from weboob.tools.browser2 import LoginBrowser, need_login, URL
from weboob.browser2 import LoginBrowser, need_login, URL
from weboob.tools.exceptions import BrowserIncorrectPassword
from .pages import LoginPage, IndexPage, AccountsPage, OperationsPage
......
......@@ -24,10 +24,10 @@ import re
from cStringIO import StringIO
from weboob.capabilities.bank import Account
from weboob.tools.browser2.page import HTMLPage, method, LoggedPage
from weboob.tools.browser2.elements import ListElement, ItemElement
from weboob.tools.browser2.filters.standard import CleanText, Regexp, CleanDecimal, Env
from weboob.tools.browser2.filters.html import Attr
from weboob.browser2.page import HTMLPage, method, LoggedPage
from weboob.browser2.elements import ListElement, ItemElement
from weboob.browser2.filters.standard import CleanText, Regexp, CleanDecimal, Env
from weboob.browser2.filters.html import Attr
from weboob.tools.captcha.virtkeyboard import MappedVirtKeyboard, VirtKeyboardError
from weboob.tools.capabilities.bank.transactions import FrenchTransaction
from weboob.tools.exceptions import ParseError
......
......@@ -18,7 +18,7 @@
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
from weboob.tools.browser2 import PagesBrowser, URL
from weboob.browser2 import PagesBrowser, URL
from .pages import ProgramPage, EventPage
......
......@@ -23,10 +23,10 @@ from datetime import datetime, time
import weboob.tools.date as date_util
from .calendar import BiplanCalendarEventConcert, BiplanCalendarEventTheatre
from weboob.tools.browser2.elements import ItemElement, SkipItem, ListElement
from weboob.tools.browser2.page import HTMLPage, method
from weboob.tools.browser2.filters.standard import Filter, CleanText, Env, Regexp, CombineDate
from weboob.tools.browser2.filters.html import Link, CleanHTML
from weboob.browser2.elements import ItemElement, SkipItem, ListElement
from weboob.browser2.page import HTMLPage, method
from weboob.browser2.filters.standard import Filter, CleanText, Env, Regexp, CombineDate
from weboob.browser2.filters.html import Link, CleanHTML
class BiplanPrice(Filter):
......
......@@ -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.browser2 import LoginBrowser, URL, need_login
from weboob.tools.exceptions import BrowserIncorrectPassword
from .pages import LoginPage, HomePage, TransactionsPage
......
......@@ -20,10 +20,10 @@
import re
from weboob.tools.browser2.page import HTMLPage, method, LoggedPage
from weboob.tools.browser2.elements import ListElement, ItemElement
from weboob.tools.browser2.filters.standard import Regexp, CleanText, CleanDecimal, Format
from weboob.tools.browser2.filters.html import Link
from weboob.browser2.page import HTMLPage, method, LoggedPage
from weboob.browser2.elements import ListElement, ItemElement
from weboob.browser2.filters.standard import Regexp, CleanText, CleanDecimal, Format
from weboob.browser2.filters.html import Link
from weboob.capabilities.bank import Account
from weboob.tools.capabilities.bank.transactions import FrenchTransaction
......
......@@ -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.browser2 import PagesBrowser, URL
from weboob.browser2 import PagesBrowser, URL
from weboob.capabilities.job import BaseJobAdvert
from .pages import SearchPage
......
......@@ -17,10 +17,10 @@
# 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.browser2.page import HTMLPage, method
from weboob.tools.browser2.elements import ItemElement, TableElement
from weboob.tools.browser2.filters.standard import Filter, CleanText, Format, Env, DateTime, TableCell, Join
from weboob.tools.browser2.filters.html import Link, CleanHTML
from weboob.browser2.page import HTMLPage, method
from weboob.browser2.elements import ItemElement, TableElement
from weboob.browser2.filters.standard import Filter, CleanText, Format, Env, DateTime, TableCell, Join
from weboob.browser2.filters.html import Link, CleanHTML
from weboob.capabilities.job import BaseJobAdvert
......
......@@ -23,7 +23,7 @@ from weboob.tools.backend import Module, BackendConfig
from weboob.tools.value import ValueBackendPassword
from weboob.capabilities.base import NotAvailable
from weboob.tools.exceptions import BrowserIncorrectPassword, ParseError
from weboob.tools.browser2 import Browser
from weboob.browser2 import Browser
from re import match, compile, sub
from decimal import Decimal
......
......@@ -26,7 +26,7 @@ except ImportError:
from datetime import datetime, timedelta
from weboob.tools.compat import basestring
from weboob.tools.browser2 import LoginBrowser, URL, Wget, need_login
from weboob.browser2 import LoginBrowser, URL, Wget, need_login
from weboob.tools.exceptions import BrowserIncorrectPassword
from weboob.capabilities.bank import Transfer, TransferError
......
......@@ -27,10 +27,10 @@ from decimal import Decimal
import re
from dateutil.relativedelta import relativedelta
from weboob.tools.browser2.page import HTMLPage, method, FormNotFound, LoggedPage
from weboob.tools.browser2.elements import ListElement, ItemElement, SkipItem
from weboob.tools.browser2.filters.standard import Filter, Env, CleanText, CleanDecimal, Field, TableCell
from weboob.tools.browser2.filters.html import Link
from weboob.browser2.page import HTMLPage, method, FormNotFound, LoggedPage
from weboob.browser2.elements import ListElement, ItemElement, SkipItem
from weboob.browser2.filters.standard import Filter, Env, CleanText, CleanDecimal, Field, TableCell
from weboob.browser2.filters.html import Link
from weboob.tools.exceptions import BrowserIncorrectPassword
from weboob.capabilities import NotAvailable
from weboob.capabilities.bank import Account
......
......@@ -18,7 +18,7 @@
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
from weboob.tools.browser2 import PagesBrowser, URL
from weboob.browser2 import PagesBrowser, URL
from .pages import StartPage
......
......@@ -17,9 +17,9 @@
# 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.browser2.page import HTMLPage, method
from weboob.tools.browser2.elements import ListElement, ItemElement
from weboob.tools.browser2.filters.standard import CleanText, Regexp, Field, Filter, debug
from weboob.browser2.page import HTMLPage, method
from weboob.browser2.elements import ListElement, ItemElement
from weboob.browser2.filters.standard import CleanText, Regexp, Field, Filter, debug
from weboob.capabilities.gauge import GaugeMeasure, GaugeSensor
from weboob.capabilities.base import NotAvailable
......
......@@ -19,7 +19,7 @@
from weboob.tools.json import json
from weboob.capabilities.collection import Collection
from weboob.tools.browser2 import LoginBrowser, URL, need_login
from weboob.browser2 import LoginBrowser, URL, need_login
from .pages import EssentialsPage, TokenPage, ContentsPage, PreferencesPage
......
......@@ -19,7 +19,7 @@
from urlparse import urlparse, parse_qs
from weboob.tools.browser2 import LoginBrowser, URL, HTMLPage
from weboob.browser2 import LoginBrowser, URL, HTMLPage
from weboob.tools.exceptions import BrowserIncorrectPassword
......
......@@ -21,11 +21,11 @@ from datetime import datetime
from weboob.capabilities.messages import Message
from weboob.capabilities.collection import Collection
from weboob.tools.browser2.page import JsonPage, method
from weboob.tools.browser2.elements import ListElement, ItemElement
from weboob.tools.browser2.filters.standard import CleanText, Format
from weboob.tools.browser2.filters.json import Dict
from weboob.tools.browser2.filters.html import CleanHTML
from weboob.browser2.page import JsonPage, method
from weboob.browser2.elements import ListElement, ItemElement
from weboob.browser2.filters.standard import CleanText, Format
from weboob.browser2.filters.json import Dict
from weboob.browser2.filters.html import CleanHTML
class DictElement(ListElement):
......
......@@ -18,7 +18,7 @@
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
from weboob.tools.browser2 import PagesBrowser, URL
from weboob.browser2 import PagesBrowser, URL
from .pages import IndexPage, VideoPage
__all__ = ['PluzzBrowser']
......
......@@ -22,11 +22,11 @@ from weboob.capabilities.video import BaseVideo
from datetime import timedelta
from weboob.tools.browser2.page import HTMLPage, method, JsonPage
from weboob.tools.browser2.elements import ItemElement, ListElement
from weboob.tools.browser2.filters.standard import Filter, CleanText, Regexp, Format, DateTime, Env, Duration
from weboob.tools.browser2.filters.html import Link, Attr, XPath
from weboob.tools.browser2.filters.json import Dict
from weboob.browser2.page import HTMLPage, method, JsonPage
from weboob.browser2.elements import ItemElement, ListElement
from weboob.browser2.filters.standard import Filter, CleanText, Regexp, Format, DateTime, Env, Duration
from weboob.browser2.filters.html import Link, Attr, XPath
from weboob.browser2.filters.json import Dict
class DurationPluzz(Filter):
......
......@@ -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.browser2 import LoginBrowser, URL, need_login
from weboob.browser2 import LoginBrowser, URL, need_login
from weboob.tools.exceptions import BrowserIncorrectPassword
from .pages import HomePage, LoginPage, HistoryPage, DetailsPage
......
......@@ -24,11 +24,11 @@ import lxml.html as html
from datetime import datetime
from decimal import Decimal
from weboob.tools.browser2.page import HTMLPage, method, LoggedPage
from weboob.tools.browser2.elements import ItemElement, ListElement
from weboob.tools.browser2.filters.standard import Date, CleanText, Filter,\
from weboob.browser2.page import HTMLPage, method, LoggedPage
from weboob.browser2.elements import ItemElement, ListElement
from weboob.browser2.filters.standard import Date, CleanText, Filter,\
CleanDecimal, Regexp, Field, DateTime, Format, Env
from weboob.tools.browser2.filters.html import Attr
from weboob.browser2.filters.html import Attr
from weboob.capabilities.bill import Detail, Bill
......
......@@ -19,10 +19,10 @@
from .history import BadUTF8Page
from weboob.capabilities.bill import Subscription
from weboob.tools.browser2.page import method
from weboob.tools.browser2.elements import ListElement, ItemElement
from weboob.tools.browser2.filters.standard import CleanText, Field, Format, Filter
from weboob.tools.browser2.filters.html import Attr
from weboob.browser2.page import method
from weboob.browser2.elements import ListElement, ItemElement
from weboob.browser2.filters.standard import CleanText, Field, Format, Filter
from weboob.browser2.filters.html import Attr
class GetID(Filter):
......
......@@ -22,7 +22,7 @@ import time
from StringIO import StringIO
from PIL import Image
from weboob.tools.browser2.page import HTMLPage
from weboob.browser2.page import HTMLPage
class FreeKeyboard(object):
......
......@@ -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.browser2 import LoginBrowser, URL, need_login
from weboob.tools.exceptions import BrowserIncorrectPassword
from .pages import LoginPage, LoginErrorPage, AvoirPage, OperationsTraiteesPage, OperationsFuturesPage
......
......@@ -18,9 +18,9 @@
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
from weboob.tools.browser2.page import HTMLPage, method, LoggedPage
from weboob.tools.browser2.elements import TableElement, ItemElement
from weboob.tools.browser2.filters.standard import CleanText, CleanDecimal, TableCell, Date
from weboob.browser2.page import HTMLPage, method, LoggedPage
from weboob.browser2.elements import TableElement, ItemElement
from weboob.browser2.filters.standard import CleanText, CleanDecimal, TableCell, Date
from weboob.capabilities.bank import Account, Transaction
from weboob.tools.date import LinearDateGuesser
......
......@@ -23,7 +23,7 @@ from datetime import timedelta
from weboob.tools.date import LinearDateGuesser
from weboob.tools.exceptions import BrowserIncorrectPassword
from weboob.tools.browser2 import LoginBrowser, URL, need_login
from weboob.browser2 import LoginBrowser, URL, need_login
from .pages import AccountsPage, CBOperationPage, CPTOperationPage, LoginPage
......
......@@ -25,10 +25,10 @@ from weboob.capabilities.bank import Account
from weboob.tools.capabilities.bank.transactions import FrenchTransaction
from weboob.tools.exceptions import BrowserIncorrectPassword
from weboob.tools.browser2.elements import ListElement, ItemElement, SkipItem
from weboob.tools.browser2.page import HTMLPage, method, LoggedPage, pagination
from weboob.tools.browser2.filters.standard import Filter, Env, CleanText, CleanDecimal, Field, DateGuesser, TableCell
from weboob.tools.browser2.filters.html import Link
from weboob.browser2.elements import ListElement, ItemElement, SkipItem
from weboob.browser2.page import HTMLPage, method, LoggedPage, pagination
from weboob.browser2.filters.standard import Filter, Env, CleanText, CleanDecimal, Field, DateGuesser, TableCell
from weboob.browser2.filters.html import Link
class Transaction(FrenchTransaction):
......
......@@ -19,7 +19,7 @@
from .pages import ProgramPage, EventPage
from weboob.tools.browser2 import PagesBrowser, URL, Firefox
from weboob.browser2 import PagesBrowser, URL, Firefox
__all__ = ['HybrideBrowser']
......
......@@ -23,10 +23,10 @@ from .calendar import HybrideCalendarEvent
import weboob.tools.date as date_util
import re
from weboob.tools.browser2.page import HTMLPage, method
from weboob.tools.browser2.elements import ItemElement, SkipItem, ListElement
from weboob.tools.browser2.filters.standard import Filter, CleanText, Env
from weboob.tools.browser2.filters.html import Link
from weboob.browser2.page import HTMLPage, method
from weboob.browser2.elements import ItemElement, SkipItem, ListElement
from weboob.browser2.filters.standard import Filter, CleanText, Env
from weboob.browser2.filters.html import Link
def format_date(date):
......
......@@ -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.browser2 import PagesBrowser, URL
from weboob.browser2 import PagesBrowser, URL
from .pages import SearchPage, AdvertPage
......
......@@ -19,10 +19,10 @@
from datetime import timedelta, datetime
import re
from weboob.tools.browser2.page import HTMLPage, method, pagination
from weboob.tools.browser2.elements import ListElement, ItemElement
from weboob.tools.browser2.filters.standard import Filter, CleanText, Regexp, Format, Env
from weboob.tools.browser2.filters.html import CleanHTML, Attr
from weboob.browser2.page import HTMLPage, method, pagination
from weboob.browser2.elements import ListElement, ItemElement
from weboob.browser2.filters.standard import Filter, CleanText, Regexp, Format, Env
from weboob.browser2.filters.html import CleanHTML, Attr
from weboob.capabilities.job import BaseJobAdvert
......
......@@ -18,7 +18,7 @@
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
import hashlib
from weboob.tools.browser2 import LoginBrowser, URL, need_login
from weboob.browser2 import LoginBrowser, URL, need_login
from weboob.tools.exceptions import BrowserIncorrectPassword, ParseError
from weboob.capabilities.bank import Account, TransferError
......
......@@ -24,10 +24,10 @@ import re
from weboob.capabilities.bank import Account
from weboob.capabilities.base import NotAvailable
from weboob.tools.browser2.page import HTMLPage, LoggedPage, method
from weboob.tools.browser2.elements import ListElement, ItemElement
from weboob.tools.browser2.filters.standard import CleanText, CleanDecimal, Filter, Field, MultiFilter, Date, Lower
from weboob.tools.browser2.filters.html import Attr
from weboob.browser2.page import HTMLPage, LoggedPage, method
from weboob.browser2.elements import ListElement, ItemElement
from weboob.browser2.filters.standard import CleanText, CleanDecimal, Filter, Field, MultiFilter, Date, Lower
from weboob.browser2.filters.html import Attr
from weboob.tools.capabilities.bank.transactions import FrenchTransaction
......
......@@ -18,11 +18,11 @@
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
from weboob.capabilities.bill import Bill, Subscription
from weboob.tools.browser2 import HTMLPage, LoggedPage
from weboob.tools.browser2.filters.standard import Filter, CleanText, Format, Field, Env
from weboob.tools.browser2.filters.html import Attr
from weboob.tools.browser2.page import method, pagination
from weboob.tools.browser2.elements import ListElement, ItemElement
from weboob.browser2 import HTMLPage, LoggedPage
from weboob.browser2.filters.standard import Filter, CleanText, Format, Field, Env
from weboob.browser2.filters.html import Attr
from weboob.browser2.page import method, pagination
from weboob.browser2.elements import ListElement, ItemElement
class FormId(Filter):
......
......@@ -21,7 +21,7 @@ from StringIO import StringIO
from weboob.tools.exceptions import BrowserIncorrectPassword
from weboob.tools.captcha.virtkeyboard import VirtKeyboard
from weboob.tools.browser2.page import HTMLPage
from weboob.browser2.page import HTMLPage
class INGVirtKeyboard(VirtKeyboard):
......
......@@ -21,9 +21,9 @@
from decimal import Decimal
from weboob.capabilities.bank import Investment
from weboob.tools.browser2.page import RawPage, HTMLPage, method, LoggedPage
from weboob.tools.browser2.elements import ListElement, ItemElement
from weboob.tools.browser2.filters.standard import CleanDecimal, CleanText, Date
from weboob.browser2.page import RawPage, HTMLPage, method, LoggedPage
from weboob.browser2.elements import ListElement, ItemElement
from weboob.browser2.filters.standard import CleanDecimal, CleanText, Date
from weboob.tools.capabilities.bank.transactions import FrenchTransaction
......
......@@ -18,10 +18,10 @@
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
from weboob.capabilities.bank import Recipient, AccountNotFound, Transfer
from weboob.tools.browser2.page import HTMLPage, LoggedPage, method
from weboob.tools.browser2.elements import ListElement, ItemElement
from weboob.tools.browser2.filters.standard import CleanText, CleanDecimal, Format
from weboob.tools.browser2.filters.html import Attr
from weboob.browser2.page import HTMLPage, LoggedPage, method
from weboob.browser2.elements import ListElement, ItemElement
from weboob.browser2.filters.standard import CleanText, CleanDecimal, Format
from weboob.browser2.filters.html import Attr
from .login import INGVirtKeyboard
......
......@@ -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.browser2 import PagesBrowser, URL
from weboob.browser2 import PagesBrowser, URL
from .pages import CityListPage, HousingListPage, HousingPage
......
......@@ -18,10 +18,10 @@
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
from decimal import Decimal
from weboob.tools.browser2.page import HTMLPage, method, pagination
from weboob.tools.browser2.elements import ItemElement, ListElement
from weboob.tools.browser2.filters.standard import CleanText, Regexp, CleanDecimal, Env, DateTime
from weboob.tools.browser2.filters.html import Attr, Link
from weboob.browser2.page import HTMLPage, method, pagination
from weboob.browser2.elements import ItemElement, ListElement
from weboob.browser2.filters.standard import CleanText, Regexp, CleanDecimal, Env, DateTime
from weboob.browser2.filters.html import Attr, Link
from weboob.capabilities.housing import City, Housing, HousingPhoto
from datetime import date, timedelta
from weboob.tools.date import DATE_TRANSLATE_FR, LinearDateGuesser
......
......@@ -18,7 +18,7 @@
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
from weboob.tools.browser2 import PagesBrowser, URL
from weboob.browser2 import PagesBrowser, URL
from .pages import IndexPage
......
......@@ -17,10 +17,10 @@
# 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.browser2.page import HTMLPage, method
from weboob.tools.browser2.elements import ListElement, ItemElement
from weboob.tools.browser2.filters.standard import CleanText, DateTime, CleanDecimal, Regexp
from weboob.tools.browser2.filters.html import Link, XPath
from weboob.browser2.page import HTMLPage, method
from weboob.browser2.elements import ListElement, ItemElement
from weboob.browser2.filters.standard import CleanText, DateTime, CleanDecimal, Regexp
from weboob.browser2.filters.html import Link, XPath
from weboob.capabilities.gauge import Gauge, GaugeMeasure, GaugeSensor
from datetime import timedelta
import re
......
......@@ -20,7 +20,7 @@
from weboob.capabilities.bank import Account
from weboob.tools.exceptions import BrowserIncorrectPassword
from weboob.tools.browser2 import LoginBrowser, URL, need_login
from weboob.browser2 import LoginBrowser, URL, need_login
from .pages import LoginPage, IndexPage, OperationsPage
......
......@@ -25,9 +25,9 @@ import requests
from weboob.tools.capabilities.bank.transactions import FrenchTransaction
from weboob.tools.captcha.virtkeyboard import MappedVirtKeyboard, VirtKeyboardError
from weboob.tools.browser2.page import HTMLPage, method, LoggedPage, pagination
from weboob.tools.browser2.elements import ListElement, ItemElement
from weboob.tools.browser2.filters.standard import Env, CleanDecimal
from weboob.browser2.page import HTMLPage, method, LoggedPage, pagination