summaryrefslogtreecommitdiff
path: root/README.rst
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2017-11-25 12:03:17 +0100
committerLars-Dominik Braun <lars@6xq.net>2017-11-25 12:03:17 +0100
commitde94e6bc320ddc38f4b0baf006c254378be5d845 (patch)
tree03d816ff1cf01464dce5e046ce811fb649540824 /README.rst
parentc1fda1e1899d12d6a582b07a6a69b4e2743867ac (diff)
downloadcrocoite-de94e6bc320ddc38f4b0baf006c254378be5d845.tar.gz
crocoite-de94e6bc320ddc38f4b0baf006c254378be5d845.tar.bz2
crocoite-de94e6bc320ddc38f4b0baf006c254378be5d845.zip
Rename --run-before-snapshot and document --on* options
Diffstat (limited to 'README.rst')
-rw-r--r--README.rst18
1 files changed, 17 insertions, 1 deletions
diff --git a/README.rst b/README.rst
index 760742b..262258b 100644
--- a/README.rst
+++ b/README.rst
@@ -10,10 +10,11 @@ Dependencies
- Python 3
- pychrome_
- warcio_
-- html5lib
+- html5lib_
.. _pychrome: https://github.com/fate0/pychrome
.. _warcio: https://github.com/webrecorder/warcio
+.. _html5lib: https://github.com/html5lib/html5lib-python
Usage
-----
@@ -31,6 +32,21 @@ For `headless Google Chrome`_ add the parameters ``--headless --disable-gpu``.
.. _pywb: https://github.com/ikreymer/pywb
.. _headless Google Chrome: https://developers.google.com/web/updates/2017/04/headless-chrome
+Injecting JavaScript
+^^^^^^^^^^^^^^^^^^^^
+
+A lot of sites need some form of interaction to load more content. Twitter for
+instance continously loads new posts when scrolling to the bottom of the page.
+crocoite can emulate these user interactions by injecting JavaScript into the
+page before loading it. For instance ``--onload=scroll.js`` scrolls the page to
+the bottom.
+
+If extra work is required before taking a DOM snapshot, additional scripts can
+be run with ``--onsnapshot=canvas-snapshot.js``, which replaces all HTML
+``<canvas>`` elements with a static picture of their current contents.
+
+Example scripts can be found in the directory ``crocoite/data/``.
+
Caveats
-------