mirror of
https://github.com/internetarchive/heritrix3.git
synced 2026-11-22 13:47:02 +00:00
Write browser behaviors inline in the Groovy profile and docs
This commit is contained in:
1 parent
fb3452a6af
commit
db156f3427
2 files changed
+6
-14
No files matched your search
@@ -979,12 +979,10 @@ default profile includes it as a commented-out ``browser`` bean:
|
||||
|
||||
.. code-block:: groovy
|
||||
|
||||
scrollDownBehavior(ScrollDownBehavior)
|
||||
extractLinksBehavior(ExtractLinksBehavior)
|
||||
browser(BrowserProcessor) {
|
||||
behaviors = [
|
||||
ref('scrollDownBehavior'),
|
||||
ref('extractLinksBehavior')
|
||||
new ScrollDownBehavior(),
|
||||
new ExtractLinksBehavior()
|
||||
]
|
||||
concurrency = 20
|
||||
executable = 'firefox'
|
||||
@@ -1036,14 +1034,10 @@ Behaviors run in the order they're listed:
|
||||
|
||||
.. code-block:: groovy
|
||||
|
||||
scrollDownBehavior(ScrollDownBehavior)
|
||||
paginationBehavior(PaginationBehavior) {
|
||||
selector = 'a.next-page'
|
||||
}
|
||||
browser(BrowserProcessor) {
|
||||
behaviors = [
|
||||
ref('scrollDownBehavior'),
|
||||
ref('paginationBehavior')
|
||||
new ScrollDownBehavior(),
|
||||
new PaginationBehavior(selector: 'a.next-page')
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
@@ -291,12 +291,10 @@ http://example.example/example
|
||||
extractorJs(ExtractorJS)
|
||||
extractorSwf(ExtractorSWF)
|
||||
/*
|
||||
scrollDownBehavior(ScrollDownBehavior)
|
||||
extractLinksBehavior(ExtractLinksBehavior)
|
||||
browser(BrowserProcessor) {
|
||||
behaviors = [
|
||||
ref('scrollDownBehavior'),
|
||||
ref('extractLinksBehavior')
|
||||
new ScrollDownBehavior(),
|
||||
new ExtractLinksBehavior()
|
||||
]
|
||||
concurrency = 20
|
||||
browsers = [
|
||||
|
||||
Reference in new issue
Block a user