Skip to main content
Version: 3.0

PuppeteerCrawlingContext <UserData>

Hierarchy

  • BrowserCrawlingContext<Page, HTTPResponse, PuppeteerController, UserData>
  • PuppeteerContextUtils
    • PuppeteerCrawlingContext

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

    • (options?: BrowserCrawlerEnqueueLinksOptions): Promise<BatchAddRequestsResult>
    • Parameters

      • optionaloptions: BrowserCrawlerEnqueueLinksOptions

      Returns Promise<BatchAddRequestsResult>

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

  • addInterceptRequestHandler(handler: InterceptHandler): Promise<void>
  • Parameters

    • handler: InterceptHandler

    Returns Promise<void>

blockRequests

  • blockRequests(options?: BlockRequestsOptions): Promise<void>
  • Parameters

    • optionaloptions: BlockRequestsOptions

    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

  • compileScript(scriptString: string, ctx?: Dictionary<any>): CompiledScriptFunction
  • Parameters

    • scriptString: string
    • optionalctx: Dictionary<any>

    Returns CompiledScriptFunction

enqueueLinksByClickingElements

  • enqueueLinksByClickingElements(options: Omit<EnqueueLinksByClickingElementsOptions, requestQueue | page>): Promise<BatchAddRequestsResult>
  • Parameters

    • options: Omit<EnqueueLinksByClickingElementsOptions, requestQueue | page>

    Returns Promise<BatchAddRequestsResult>

infiniteScroll

  • infiniteScroll(options?: InfiniteScrollOptions): Promise<void>
  • Parameters

    • optionaloptions: InfiniteScrollOptions

    Returns Promise<void>

injectFile

  • injectFile(filePath: string, options?: InjectFileOptions): Promise<unknown>
  • Parameters

    • filePath: string
    • optionaloptions: InjectFileOptions

    Returns Promise<unknown>

injectJQuery

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

parseWithCheerio

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

removeInterceptRequestHandler

  • removeInterceptRequestHandler(handler: InterceptHandler): Promise<void>
  • Parameters

    • handler: InterceptHandler

    Returns Promise<void>

saveSnapshot

  • saveSnapshot(options?: SaveSnapshotOptions): Promise<void>
  • Parameters

    • optionaloptions: SaveSnapshotOptions

    Returns Promise<void>