compass.validation.location.JurisdictionWebsiteValidator#

class JurisdictionWebsiteValidator(browser_semaphore=None, file_loader_kwargs=None, **kwargs)[source]#

Bases: object

COMPASS Ordinance Jurisdiction Website validator

Parameters:
  • browser_semaphore (asyncio.Semaphore, optional) – Semaphore instance that can be used to limit the number of playwright browsers open concurrently. If None, no limits are applied. By default, None.

  • file_loader_kwargs (dict, optional) – Dictionary of keyword arguments pairs to initialize elm.web.file_loader.AsyncFileLoader. By default, None.

  • **kwargs – Additional keyword arguments to pass to the BaseLLMCaller instance.

Methods

check(url, jurisdiction)

Check if the website is the main website for a jurisdiction

Attributes

WEB_PAGE_CHECK_SYSTEM_MESSAGE

async check(url, jurisdiction)[source]#

Check if the website is the main website for a jurisdiction

Parameters:

url (str) – URL of the website to validate.

Returns:

boolTrue if the website is the main website for the given jurisdiction; False otherwise.