BrowsersΒΆ

../../../_images/browsers.png

Most of modules use a class derived from PagesBrowser or LoginBrowser (for authenticated websites) to interact with a website or APIBrowser to interact with an API.

Edit browser.py:

# -*- coding: utf-8 -*-

from woob.browser import PagesBrowser

__all__ = ['ExampleBrowser']

class ExampleBrowser(PagesBrowser):
    BASEURL = 'https://www.example.com'

There are several possible class attributes:

  • BASEURL - base url of website used for absolute paths given to open or 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)

Documentation: