MCPcopy Create free account
hub / github.com/omkarcloud/botasaurus / getMaxRuns

Method getMaxRuns

js/botasaurus-server-js/src/server.ts:458–468  ·  view source on GitHub ↗
(scraper: any)

Source from the content-addressed store, hash-verified

456 }
457
458 private getMaxRuns(scraper: any): any{
459 if (this.isScraperBasedRateLimit) {
460 // For scraper-based rate limit, use the scraper name as key.
461 // @ts-ignore
462 return this.rateLimit[scraper.scraper_name] ?? null;
463 } else {
464 // For type-based rate limit, use the scraper type as key.
465 // @ts-ignore
466 return this.rateLimit[scraper.scraper_type] ?? null;
467 }
468 }
469
470 setRateLimit(rateLimit: { browser?: number; request?: number; task?: number } | Record<string, number> = { browser: 1 }): void {
471 const allowedKeys = ['browser', 'request', 'task'];

Callers 1

getScrapersConfigMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected