autoextract_poet.pages.AutoExtractWebPage

class AutoExtractWebPage(response: autoextract_poet.page_inputs.AutoExtractHtml)[source]

Bases: web_poet.pages.Injectable, web_poet.mixins.ResponseShortcutsMixin

Base Page Object which requires AutoExtractHtml and provides XPath / CSS shortcuts.

Use this class as a base class for Page Objects which work on the browser HTML provided by AutoExtract.

__init__(response: autoextract_poet.page_inputs.AutoExtractHtml) None

Method generated by attrs for class AutoExtractWebPage.

Methods

__init__(response)

Method generated by attrs for class AutoExtractWebPage.

css(query)

Run a CSS query on a response, using parsel.Selector.

urljoin(url)

Convert url to absolute, taking in account url and baseurl of the response

xpath(query, **kwargs)

Run an XPath query on a response, using parsel.Selector.

Attributes

base_url

Return the base url of the given response

html

Shortcut to HTML Response's content.

selector

parsel.Selector instance for the HTML Response.

url

Shortcut to HTML Response's URL.

response