Commit 75abe3cf authored by Florent Viard's avatar Florent Viard Committed by Vincent A

[docs] Fixes typos in the code of 2 sections of the cookbook

parent be7e0390
......@@ -207,11 +207,11 @@ This example code isn't very semantic and could fail silently if columns are cha
obj_id = CleanText('./td[1]')
obj_foo = CleanText('./td[2]')
It can be improved by using the column labels::
It can be improved by using a :class:`weboob.browser.elements.TableElement` and the column labels::
class MyPage(HTMLPage):
class iter_stuff(ListElement):
class iter_stuff(TableElement):
head_xpath = '//table/tr/th' # where to look for column titles
# these are the column titles from the site
......@@ -275,8 +275,8 @@ When going to next page requires making a ``POST``::
class iter_stuff(ListElement):
def next_page(self):
if self.doc.get('next_page_params'):
return requests.Request('POST',, data=self.doc.get('next_page_params'))
return requests.Request('POST',,'next_page_params'))
item_xpath = 'items'
......@@ -391,6 +391,7 @@ decorated method.
You can either define it yourself, as a class boolean attribute or as a property, or inherit your class from :class:`LoggedPage <weboob.browser.pages.LoggedPage>`.
In the latter case, remember that Python inheritance requires the :class:`LoggedPage <weboob.browser.pages.LoggedPage>` to be placed first such as in::
from weboob.browser.pages import LoggedPage, HTMLPage
class OnlyForLoggedUserPage(LoggedPage, HTMLPage):
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment