Skip to main content
Version: 3.0

PuppeteerCrawlingContext <UserData>

Hierarchy

Index

Properties

browserController

browserController: PuppeteerController

crawler

crawler: BrowserCrawler<BrowserPoolOptions<BrowserPlugin<CommonLibrary, unknown, CommonBrowser, unknown, CommonPage>>, Dictionary<any>, BrowserCrawlingContext<CommonPage, Dictionary<any>, BrowserController<CommonLibrary, unknown, CommonBrowser, unknown, CommonPage>, Dictionary<any>>, Dictionary<any>>

enqueueLinks

enqueueLinks: (options?: BrowserCrawlerEnqueueLinksOptions) => Promise<BatchAddRequestsResult>

Type declaration

id

id: string

log

log: Log

page

page: Page

optionalproxyInfo

proxyInfo?: ProxyInfo

An object with information about currently used proxy by the crawler and configured by the ProxyConfiguration class.

request

request: Request<UserData>

The original Request object.

optionalresponse

response?: HTTPResponse

sendRequest

sendRequest: (overrideOptions?: Partial<OptionsInit>) => Promise<Response<string>>

Type declaration

    • (overrideOptions?: Partial<OptionsInit>): Promise<Response<string>>
    • Parameters

      • optionaloverrideOptions: Partial<OptionsInit>

      Returns Promise<Response<string>>

optionalsession

session?: Session

Methods

addInterceptRequestHandler

  • Parameters

    Returns Promise<void>

blockRequests

  • Parameters

    Returns Promise<void>

blockResources

  • blockResources(resourceTypes?: string[]): Promise<void>
  • Parameters

    • optionalresourceTypes: string[]

    Returns Promise<void>

cacheResponses

  • cacheResponses(cache: Dictionary<Partial<ResponseForRequest>>, responseUrlRules: (string | RegExp)[]): Promise<void>
  • Parameters

    • cache: Dictionary<Partial<ResponseForRequest>>
    • responseUrlRules: (string | RegExp)[]

    Returns Promise<void>

compileScript

  • Parameters

    • scriptString: string
    • optionalctx: Dictionary<any>

    Returns CompiledScriptFunction

enqueueLinksByClickingElements

infiniteScroll

  • Parameters

    Returns Promise<void>

injectFile

  • Parameters

    Returns Promise<unknown>

injectJQuery

  • injectJQuery(): Promise<unknown>
  • Returns Promise<unknown>

parseWithCheerio

  • parseWithCheerio(): Promise<CheerioAPI>
  • Returns Promise<CheerioAPI>

removeInterceptRequestHandler

  • Parameters

    Returns Promise<void>

saveSnapshot

  • Parameters

    Returns Promise<void>