RenderingTypePredictor
experimental
Implements
Index
Constructors
Methods
Constructors
constructor
- experimental
Parameters
__namedParameters: RenderingTypePredictorOptions
Returns RenderingTypePredictor
Methods
[asyncDispose]
- experimental
Returns Promise<void>
initialize
- experimental
Initialize the predictor by restoring persisted state.
Returns Promise<void>
publicpredict
- experimental
Predict the rendering type for a given URL and request label.
Parameters
__namedParameters: CrawleeRequest<Dictionary>
Returns { detectionProbabilityRecommendation: number; renderingType: RenderingType }
detectionProbabilityRecommendation: number
renderingType: RenderingType
publicstoreResult
- experimental
Store the rendering type for a given URL and request label. This updates the underlying prediction model, which may be costly.
Parameters
requests: CrawleeRequest<Dictionary> | CrawleeRequest<Dictionary>[]
renderingType: RenderingType
Returns void
teardown
- experimental
Stop persisting the model, writing it out one last time.
initialize()reopens the persistence window.Returns Promise<void>
Stores rendering type information for previously crawled URLs and predicts the rendering type for URLs that have yet to be crawled and recommends when rendering type detection should be performed.