elm.ords.download.download_county_ordinance
- async download_county_ordinance(location, text_splitter, num_urls=5, file_loader_kwargs=None, browser_semaphore=None, **kwargs)[source]
Download the ordinance document(s) for a single county.
- Parameters:
location (
elm.ords.utilities.location.Location
) – Location objects representing the county.text_splitter (obj, optional) – Instance of an object that implements a split_text method. The method should take text as input (str) and return a list of text chunks. Raw text from HTML pages will be passed through this splitter to split the single wep page into multiple pages for the output document. Langchain’s text splitters should work for this input.
num_urls (int, optional) – Number of unique Google search result URL’s to check for ordinance document. By default,
5
.file_loader_kwargs (dict, optional) – Dictionary of keyword-argument pairs to initialize
elm.web.file_loader.AsyncFileLoader
with. If found, the “pw_launch_kwargs” key in these will also be used to initialize theelm.web.google_search.PlaywrightGoogleLinkSearch
used for the google URL search. By default,None
.browser_semaphore (
asyncio.Semaphore
, optional) – Semaphore instance that can be used to limit the number of playwright browsers open concurrently. IfNone
, no limits are applied. By default,None
.**kwargs – Keyword-value pairs used to initialize an elm.ords.llm.LLMCaller instance.
- Returns:
elm.web.document.BaseDocument | None – Document instance for the downloaded document, or
None
if no document was found.