MCPcopy
hub / github.com/yujiosaka/headless-chrome-crawler / launch

Function launch

examples/redis-cache.js:6–14  ·  view source on GitHub ↗
(persistCache)

Source from the content-addressed store, hash-verified

4const cache = new RedisCache({ host: '127.0.0.1', port: 6379 });
5
6function launch(persistCache) {
7 return HCCrawler.launch({
8 onSuccess: result => {
9 console.log(`Requested ${result.options.url}.`);
10 },
11 cache,
12 persistCache, // Cache won't be cleared when closing the crawler if set true
13 });
14}
15
16(async () => {
17 const crawler1 = await launch(true); // Launch the crawler with persisting cache

Callers 1

redis-cache.jsFile · 0.85

Calls 1

launchMethod · 0.80

Tested by

no test coverage detected