compass.web.priority_crawl.PriorityCrawler#

class PriorityCrawler(caller, loader, pdf_loader, html_loader, context, *, max_pages=15, max_depth=3, max_links=3, max_ranked_links=10, stop_score=10, stop_count=1, url_filter=None, events=None)[source]#

Bases: object

Visit the strongest available link across one shared queue.

Methods

run(seeds)

Rank the seeds, crawl, and return the candidate documents

async run(seeds)[source]#

Rank the seeds, crawl, and return the candidate documents

Parameters:

seeds (list of dict) – Search results to start from, each with a "url" and its "sources".

Returns:

list – Candidate ordinance documents, best first.