16 Commits

Author SHA1 Message Date
Mike Fährmann
71680feab9 [actions] implement 'flag … = skip' (#8960) 2026-02-06 10:10:38 +01:00
Mike Fährmann
fd6f19347a [actions] fix 'abort' (#8753)
fixes regression introduced in 2eb5e52055

forward the correct arguments to StopExtraction.__init__
instead of logging message and 'extras'
2025-12-26 14:07:48 +01:00
Mike Fährmann
5e3284f0e6 [actions] add 'LoggerAdapter.traceback()' method (#8317)
8c62be343e
2025-11-28 14:15:20 +01:00
Mike Fährmann
bccf467d19 [actions] allow using actions as 'signals-actions' target 2025-07-14 22:58:02 +02:00
Mike Fährmann
f7e84f0a09 [actions] add 'raise' action 2025-07-14 21:32:56 +02:00
Mike Fährmann
0a6e58b8ba [actions] add 'flag' action 2025-07-14 21:29:40 +02:00
Mike Fährmann
434bf3b1f3 use 'util.re()' in more places
continuation of b5c88b3d3e
2025-06-23 20:31:45 +02:00
Mike Fährmann
e03b99ba0e [actions] emit logging messages before waiting/exiting/etc
distinguish between actions that should run before or after
a logging message gets emitted
2024-07-01 01:19:25 +02:00
Mike Fährmann
f7a6401031 [actions] move LoggerAdapter from 'output' to 'actions' 2024-06-30 20:41:51 +02:00
Mike Fährmann
f41a5065b2 [actions] support multiple actions per pattern 2024-06-30 02:36:33 +02:00
Mike Fährmann
8219a78b8d [actions] extend 'wait'
allow specifying a duration like for --sleep
2024-06-29 23:58:38 +02:00
Mike Fährmann
84b3da54aa [actions] add 'exec' action (#5619) 2024-06-29 23:02:48 +02:00
Mike Fährmann
c9860002ba [actions] add 'abort' and 'terminate' actions (#5778) 2024-06-29 19:20:17 +02:00
Mike Fährmann
d80f4fbc10 [actions] optimize empty patterns 2024-06-29 18:57:48 +02:00
Mike Fährmann
92f98e6f5e 'sys.exit' -> 'SystemExit' 2023-08-21 23:46:39 +02:00
Mike Fährmann
4235d412c4 implement 'actions'
continuation of d37e7f48
but more versatile and extendable

Example:

"actions": [
    # change debug messages to info
    ["debug", "level ~info"],

    # change exit status to a non-zero value
    ["info:^No results for", "status |= 1"],

    # exit with status 2 on 429
    ["warning:429", "exit 2"],

    # restart extractor when no cookies found
    ["warning:^[Nn]o .*cookies", "restart"]
]
2023-03-10 22:08:10 +01:00