fix doctests
This commit is contained in:
parent
860492b091
commit
c281d7a255
2 changed files with 4 additions and 0 deletions
|
|
@ -538,6 +538,7 @@ class PagesBrowser(DomainBrowser):
|
|||
|
||||
Example:
|
||||
|
||||
>>> from .pages import Page
|
||||
>>> class HomePage(Page):
|
||||
... pass
|
||||
...
|
||||
|
|
@ -635,6 +636,7 @@ class PagesBrowser(DomainBrowser):
|
|||
|
||||
:class:`NextPage` constructor can take an url or a Request object.
|
||||
|
||||
>>> from .pages import HTMLPage
|
||||
>>> class Page(HTMLPage):
|
||||
... def iter_values(self):
|
||||
... for el in self.doc.xpath('//li'):
|
||||
|
|
|
|||
|
|
@ -47,6 +47,8 @@ def pagination(func):
|
|||
... for next in self.doc.xpath('//a'):
|
||||
... raise NextPage(next.attrib['href'])
|
||||
...
|
||||
>>> from .browsers import PagesBrowser
|
||||
>>> from .url import URL
|
||||
>>> class Browser(PagesBrowser):
|
||||
... BASEURL = 'http://people.symlink.me'
|
||||
... list = URL('/~rom1/projects/weboob/list-(?P<pagenum>\d+).html', Page)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue