libweb.xpath

XpathService

class libweb.xpath.XpathService(creds=None, opts=None, **conf)[source]

A simple service based on HTTP requests (using XML as the reponse body)

Keyword Arguments:
 xpath (dict) – key/value matches for extracting data
build_tree(content)[source]

Uses defusedxml to parse the response into ElementTree

get_results()[source]

Make the HTTP requests and yield a structured message

HtmlXpathService

class libweb.xpath.HtmlXpathService(creds=None, opts=None, **conf)[source]

A simple service using XPATH with LXML to parse HTML.

Keyword argumnets:

build_tree(content)[source]

Use the html5lib parser to parse HTML