From 9f3243b8e3acb1f485b5b4800acda3f97deb9f40 Mon Sep 17 00:00:00 2001 From: Ilya Kreymer Date: Wed, 13 Sep 2023 10:46:40 -0700 Subject: [PATCH] Update README.md --- README.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 963df7507..a3b9733a4 100644 --- a/README.md +++ b/README.md @@ -490,13 +490,16 @@ See [Browsertrix Behaviors](https://github.com/webrecorder/browsertrix-behaviors With version 0.9.0, Browsertrix Crawler includes a `--pageExtraDelay`/`--delay` option, which can be used to have the crawler sleep for a configurable number of seconds after behaviors before moving on to the next page. -Custom behaviours can also be mounted into the crawler and loaded from there. For example: +### Additional Custom Behaviors -```zsh +Custom behaviours can now also be mounted into the crawler and loaded from there. For example: + +```sh docker run -v $PWD/test-crawls:/crawls -v $PWD/tests/custom-behaviors/:/custom-behaviors/ webrecorder/browsertrix-crawler crawl --url https://example.com/ --customBehaviors /custom-behaviors/ ``` -Which will load all the custom behaviors stored in the `tests/custom-behaviors` directory. +This will load all the custom behaviors stored in the `tests/custom-behaviors` directory. The first behavior which returns true for `isMatch()` will be run on a given page. +Each behavior should container a single class that implements the behavior interface. See [the behaviors tutorial](https://github.com/webrecorder/browsertrix-behaviors/blob/main/docs/TUTORIAL.md) for more info on how to write behaviors. ### Screenshots