woob.browser.elements

class woob.browser.elements.AbstractElement(page, parent=None, el=None)

Bases: object

condition = None
cssselect(*args, **kwargs)
fill_env(page, parent=None)
handle_loaders()
parse(obj)
use_selector(func, key=None)
xpath(*args, **kwargs)
exception woob.browser.elements.DataError

Bases: Exception

Returned data from pages are incoherent.

class woob.browser.elements.ItemElement(*args, **kwargs)

Bases: woob.browser.elements.AbstractElement

class Index

Bases: object

build_object()
handle_attr(key, func)
klass = None
should_highlight()
skip_optional_fields_errors = False
validate = None
class woob.browser.elements.ItemElementFromAbstractPage(*args, **kwargs)

Bases: woob.browser.elements.ItemElement

ItemElementFromAbstractPage allow to use ItemElement class from an AbstractPage of another module and to overwrite specific obj_*.

ITER_ELEMENT is an optional attribute to define which class should be used from the page loaded by AbstractPage, default to current iter_element class name.

For example:

>>> from woob.browser.elements import DictElement, ItemElementFromAbstractPage, method
>>> from woob.browser.pages import AbstractPage
>>>
>>> class AccountsPage(AbstractPage):
...     PARENT = 'stet'
...     PARENT_URL = 'accounts'
...
...     @method
...     class iter_accounts(DictElement):
...         item_xpath = 'accounts'
...
...         class item(ItemElementFromAbstractPage):
...             ITER_ELEMENT = "iter_accounts"  # optional
...
...             obj_label = "XXX"
ITER_ELEMENT = None
PARENT = None
PARENT_URL = None
class woob.browser.elements.ListElement(*args, **kwargs)

Bases: woob.browser.elements.AbstractElement

check_next_page()
empty_xpath = None
find_elements()

Get the nodes that will have to be processed. This method can be overridden if xpath filters are not sufficient.

flush()
flush_at_end = False
ignore_duplicate = False
item_xpath = None
store(obj)
exception woob.browser.elements.SkipItem

Bases: Exception

Raise this exception in an ItemElement subclass to skip an item.

class woob.browser.elements.TableElement(*args, **kwargs)

Bases: woob.browser.elements.ListElement

cleaner

alias of woob.browser.filters.standard.CleanText

get_colnum(name)
head_xpath = None