Splash provides a custom Jupyter (previously known as IPython) kernel for Lua.
Together with Jupyter notebook frontend it forms an interactive
web-based development environment for Splash Scripts with syntax highlighting,
smart code completion, context-aware help, inline images support and a real
live WebKit browser window with Web Inspector enabled, controllable from
a notebook.

Without -it flags you won’t be able to stop the container using Ctrl-C.

If you’re on Linux, Jupyter server with Splash kernel enabled
will be available at http://0.0.0.0:8888.

If you use boot2docker, run $boot2dockerip to get the ip address,
the visit http://<ip-returned-by-boot2docker>:8888. If you use
docker-machine, run $docker-machineip<yourmachine> to get the ip.

By default, notebooks are stored in a Docker container; they are destroyed
when you restart an image. To persist notebooks you can mount a local folder
to /notebooks. For example, let’s use current folder to store the
notebooks:

To make the script more generic you can use splash.args instead of
hardcoded constants (e.g. for page urls). Also, consider submitting several
requests with different arguments instead of running a loop in a script
if you need to visit and process several pages - it is an easy way
to parallelize the work.

There are some gotchas:

When you run a notebook cell and then run another notebook cell there
is a delay between runs; the effect is similar to inserting
splash:wait calls at the beginning of each cell.

Regardless of sandbox settings, scripts in Jupyter
notebook are not sandboxed. Usually it is not a problem,
but some functions may be unavailable in HTTP API if sandbox is enabled.