2020-10-31 13:16:37 -07:00
|
|
|
{
|
|
|
|
"name": "browsertrix-crawler",
|
2023-05-19 07:44:29 -07:00
|
|
|
"version": "0.10.0-beta.3",
|
2020-10-31 13:16:37 -07:00
|
|
|
"main": "browsertrix-crawler",
|
2022-10-24 15:30:10 +02:00
|
|
|
"type": "module",
|
2020-10-31 13:16:37 -07:00
|
|
|
"repository": "https://github.com/webrecorder/browsertrix-crawler",
|
|
|
|
"author": "Ilya Kreymer <ikreymer@gmail.com>, Webrecorder Software",
|
2022-11-21 09:19:42 -08:00
|
|
|
"license": "AGPL-3.0-or-later",
|
2021-04-30 12:31:14 -07:00
|
|
|
"scripts": {
|
2022-10-24 15:30:10 +02:00
|
|
|
"lint": "eslint *.js util/*.js tests/*.test.js",
|
2023-03-08 21:31:19 -05:00
|
|
|
"test": "yarn node --experimental-vm-modules $(yarn bin jest --bail 1)"
|
2021-04-30 12:31:14 -07:00
|
|
|
},
|
2020-10-31 13:16:37 -07:00
|
|
|
"dependencies": {
|
Dev 0.9.0 Beta 1 Work - Playwright Removal + Worker Refactor + Redis State (#253)
* Migrate from Puppeteer to Playwright!
- use playwright persistent browser context to support profiles
- move on-new-page setup actions to worker
- fix screencaster, init only one per page object, associate with worker-id
- fix device emulation: load on startup, also replace '-' with space for more friendly command-line usage
- port additional chromium setup options
- create / detach cdp per page for each new page, screencaster just uses existing cdp
- fix evaluateWithCLI to call CDP command directly
- workers directly during WorkerPool - await not necessary
* State / Worker Refactor (#252)
* refactoring state:
- use RedisCrawlState, defaulting to local redis, remove MemoryCrawlState and BaseState
- remove 'real' accessors / draining queue - no longer neede without puppeteer-cluster
- switch to sorted set for crawl queue, set depth + extraHops as score, (fixes #150)
- override console.error to avoid logging ioredis errors (fixes #244)
- add MAX_DEPTH as const for extraHops
- fix immediate exit on second interrupt
* worker/state refactor:
- remove job object from puppeteer-cluster
- rename shift() -> nextFromQueue()
- condense crawl mgmt logic to crawlPageInWorker: init page, mark pages as finished/failed, close page on failure, etc...
- screencaster: don't screencast about:blank pages
* more worker queue refactor:
- remove p-queue
- initialize PageWorkers which run in its own loop to process pages, until no pending pages, no queued pages
- add setupPage(), teardownPage() to crawler, called from worker
- await runWorkers() promise which runs all workers until completion
- remove: p-queue, node-fetch, update README (no longer using any puppeteer-cluster base code)
- bump to 0.9.0-beta.1
* use existing data object for per-page context, instead of adding things to page (will be more clear with typescript transition)
* more fixes for playwright:
- fix profile creation
- browser: add newWindowPageWithCDP() to create new page + cdp in new window, use with timeout
- crawler: various fixes, including for html check
- logging: addition logging for screencaster, new window, etc...
- remove unused packages
---------
Co-authored-by: Tessa Walsh <tessa@bitarchivist.net>
2023-03-17 12:50:32 -07:00
|
|
|
"@novnc/novnc": "^1.4.0",
|
Catch loading issues (#255)
* various loading improvements to avoid pages getting 'stuck' + load state tracking
- add PageState object, store loadstate (0 to 4) as well as other per-page-state properties on defined object.
- set loadState to 0 (failed) by default
- set loadState to 1 (content-loaded) on 'domcontentloaded' event
- if page.goto() finishes, set to loadState to 2 'full-page-load'.
- if page.goto() times out, if no domcontentloaded either, fail immediately. if domcontentloaded reached, extract links, but don't run behaviors
- page considered 'finished' if it got to at least loadState 2 'full-pageload', even if behaviors timed out
- pages: log 'loadState' as part of pages.jsonl
- improve frame detection: detect if frame actually not from a frame tag (eg. OBJECT) tag, and skip as well
- screencaster: try screencasting every frame for now instead of every other frame, for smoother screencasting
- deps: behaviors: bump to browsertrix-behaviors 0.5.0-beta.0 release (includes autoscroll improvements)
- workers ids: just use 0, 1, ... n-1 worker indexes, send numeric index as part of screencast messages
- worker: only keeps track of crash state to recreate page, decouple crash and page failed/succeeded state
- screencaster: allow reusing caster slots with fixed ids
- interrupt timedCrawlPage() wait if 'crash' event happens
- crawler: pageFinished() callback when page finishes
- worker: add workerIdle callback, call screencaster.stopById() and send 'close' message when worker is empty
2023-03-20 18:31:37 -07:00
|
|
|
"browsertrix-behaviors": "^0.5.0-beta.0",
|
2022-10-24 15:30:10 +02:00
|
|
|
"get-folder-size": "^4.0.0",
|
2021-04-30 12:31:14 -07:00
|
|
|
"ioredis": "^4.27.1",
|
Per-Seed Scoping Rules + Crawl Depth (#63)
* scoped seeds:
- support per-seed scoping (include + exclude), allowHash, depth, and sitemap options
- support maxDepth per seed #16
- combine --url, --seed and --urlFile/--seedFile urls into a unified seed list
arg parsing:
- simplify seed file options into --seedFile/--urlFile, move option in help display
- rename --maxDepth -> --depth, supported globally and per seed
- ensure custom parsed params from argParser passed back correctly (behaviors, logging, device emulation)
- update to latest js-yaml
- rename --yamlConfig -> --config
- config: support reading config from stdin if --config set to 'stdin'
* scope: fix typo in 'prefix' scope
* update browsertrix-behaviors to 0.2.2
* tests: add test for passing config via stdin, also adding --excludes via cmdline
* update README:
- latest cli, add docs on config via stdin
- rename --yamlConfig -> --config, consolidate --seedFile/--urlFile, move arg position
- info on scoped seeds
- list current scope types
2021-06-26 13:11:29 -07:00
|
|
|
"js-yaml": "^4.1.0",
|
2022-04-09 22:06:35 -07:00
|
|
|
"minio": "7.0.26",
|
2023-04-26 15:41:35 -07:00
|
|
|
"puppeteer-core": "^19.11.1",
|
2020-11-14 21:55:02 +00:00
|
|
|
"sitemapper": "^3.1.2",
|
2021-02-17 12:37:07 -05:00
|
|
|
"uuid": "8.3.2",
|
2022-10-24 15:30:10 +02:00
|
|
|
"warcio": "^1.6.0",
|
2021-06-07 17:43:36 -07:00
|
|
|
"ws": "^7.4.4",
|
2021-02-17 12:37:07 -05:00
|
|
|
"yargs": "^16.0.3"
|
|
|
|
},
|
2020-11-01 19:22:53 -08:00
|
|
|
"devDependencies": {
|
2021-02-17 12:37:07 -05:00
|
|
|
"eslint": "^7.20.0",
|
2021-03-01 19:00:23 -05:00
|
|
|
"eslint-plugin-react": "^7.22.0",
|
2022-10-24 15:30:10 +02:00
|
|
|
"jest": "^29.2.1",
|
2022-02-20 22:22:19 -08:00
|
|
|
"md5": "^2.3.0"
|
2022-10-24 15:30:10 +02:00
|
|
|
},
|
|
|
|
"jest": {
|
|
|
|
"transform": {},
|
|
|
|
"testTimeout": 90000
|
2020-10-31 13:16:37 -07:00
|
|
|
}
|
|
|
|
}
|