--adblock-rules
- CLI
- --adblock-rules
- REST
- CLI only
Blocks requests and hides page elements that match an EasyList-syntax filter list, read from a file path or http(s) URL. Repeatable; every list joins one engine.
Lists load once at startup and malformed lines are skipped.
Blocking
A request matching a blocking rule is cancelled, whatever its resource type. A rule matching the target URL itself stops the render before any connection, exiting with code 5 or answering 403 on the server.
An exception rule, @@, only lifts another adblock rule. It cannot admit an address the IP filter blocks or a page robots.txt disallows.
Hiding
After the page loads, ZShot injects display:none CSS for the list’s host-scoped hiding rules and runs its scriptlets. Elements added later stay visible, and generic hiding rules are not applied.
Example
zshot -f pipeline.png \
--adblock-rules https://easylist.to/easylist/easylist.txt \
https://zshot-cli.com/example_assets/zrm/