IRenderingTypePredictor
experimental
Implemented by
Index
Methods
Methods
predict
- experimental
Predict the rendering type for a request, and how likely the crawler should be to verify it.
Called once per request, before navigation - the crawler awaits it, so prefer loading whatever the prediction needs up front over per-request I/O.
Parameters
request: CrawleeRequest<Dictionary>
Returns Awaitable<{ detectionProbabilityRecommendation: number; renderingType: RenderingType }>
storeResult
- experimental
Report a detected rendering type, so that future predictions can take it into account.
The crawler does not await this per detection - it collects the returned promises and drains them in
teardown(), so an implementation that persists results asynchronously can keep batching its writes and still be sure they land before the crawl ends.Parameters
requests: CrawleeRequest<Dictionary> | CrawleeRequest<Dictionary>[]
renderingType: RenderingType
Returns Awaitable<void>
Minimal contract that any object passed to AdaptivePlaywrightCrawler as its
renderingTypePredictoroption must satisfy.