Web Crawlers¶
We have a bunch of sophisticated crawlers designed to scrape websites. Crawlers are
configured via source records.
The heavy-lifting is done right out of hardcore testing applications: playwright. We have some tricks involving running headless (but actually not) in order to mitigate the arms race against bots and crawlers that our target sources array against us.
Crawling isn’t limited to the web - we can also crawl local documents, sending them to AI for ingesting into the suite too.
- class lbn.aidoc.crawl.Crawler¶
Bases:
objectThe Governor: Manages source-specific adapters and the model-bound lifecycle.
- class lbn.aidoc.crawl.core.Crawler¶
Bases:
objectThe Governor: Manages source-specific adapters and the model-bound lifecycle.
- lbn.aidoc.crawl.fetchers.content_driver()¶
- lbn.aidoc.crawl.gatherers.content_driver()¶
returns our configured content/data collectors
- lbn.aidoc.crawl.gatherers.file_driver(mime_type) Tuple[Dict[str, Any], Dict[str, Any]]¶
returns appropriate content, and metadata gatherers for the mime type
- lbn.aidoc.crawl.gatherers.metadata_driver()¶
returns our configured meta data collectors
- class lbn.aidoc.crawl.adapters.BaseAdapter¶
Bases:
ABCmanages/degates to fetch and gather content, and return job, company, role dicts via it’s map_triad
- class lbn.aidoc.crawl.adapters.BraveAdapter¶
Bases:
BaseAdaptercalls brave.com and passes through query results without further adornment/structuring
- class lbn.aidoc.crawl.adapters.JSONAdapter¶
Bases:
BaseAdapter
- class lbn.aidoc.crawl.adapters.LangChainHttpAdapter¶
Bases:
BaseAdapter
- class lbn.aidoc.crawl.adapters.LangChainSimpleAdapter¶
Bases:
BaseAdapterUses LangChain fetchers - but without source
- class lbn.aidoc.crawl.adapters.LinkedInAdapter¶
Bases:
BaseAdapteruse LinkedInAPI to crawl LinkedIn
- class lbn.aidoc.crawl.adapters.LocalFileAdapter¶
Bases:
BaseAdapterSurgically inspects the file suffix on initialization to dynamically plug only the required content and metadata drivers—or fails fast with a ValueError.
- class lbn.aidoc.crawl.adapters.PlaywrightAdapter¶
Bases:
BaseAdapteruses underlying chrome/firefox to get past javascript, cloudflare turnstiles to download content
- class lbn.aidoc.crawl.adapters.StaticAdapter¶
Bases:
BaseAdapterdumb adapter; uses requests; fails if javascript et al needs to be enabled
- lbn.aidoc.crawl.adapters.driver(source)¶