Skip to content
Steve edited this page Sep 21, 2017 · 32 revisions

Simply import wptools to get started.

>>> import wptools

You can instantiate one of the following:

The optional flags and arguments below work for page, category, and site objects.

Object data echoes automatically. You can turn that off with silent=True:

>>> page = wptools.page(silent=True)

HTTP request/response details echo to stderr with verbose=True:

>>> page = wptools.page(verbose=True)

All request actions support setting proxy and timeout (in seconds):

>>> page.get(proxy='http://example.com:80', timeout=5)

You can skip request actions using skip:

>>> page = wptools.page(skip=['claims', 'imageinfo'])

Clone this wiki locally