chrome spider
Write it in javascript,
start script starts chrome and opens the extension by opening extension's page
another scripts opens a http server locally to feed the initial command and rules
the extension then executes as instructed
see also:
https://chrome.google.com/webstore/detail/wild-spider/aanpchnfojihjddlocpgoekffmjkhbbe
https://chrome.google.com/webstore/detail/chrome-crawler/amjiobljggbfblhmiadbhpjbjakbkldd/reviews