understatapi.parsers.base module

Base html parser

class understatapi.parsers.base.BaseParser[source]

Bases: object

Parse a html document and extract relevant data

queries: List[str]
static parse(html, query='teamsData')[source]

Finds a JSON in the HTML according to a query, and returns the object corresponding to this JSON.

Parameters
  • html (str) – A html document

  • query (str) – A sub-string to look for in the html document

Return type

Dict[str, Any]