Download a live site for check when there is no build.
Reads the sitemap (from --sitemap, robots.txt or /sitemap.xml), obeys robots.txt, never leaves the host, stops at --limit, and saves each page where check reads it back under the same URL. Status codes and redirects go to fetch.json, X-Robots-Tag headers to _headers, and robots.txt and the sitemap files alongside — then it prints the check command to run next. --crawl also follows links and names pages missing from the sitemap; --render saves what an installed Chromium draws, kept to the site's host.
usage: indexgap fetch [-h] --out-dir OUT_DIR [--sitemap SITEMAP]
[--limit LIMIT] [--all] [--delay DELAY] [--jobs JOBS]
[--crawl] [--render] [--browser PATH]
[--browser-no-sandbox]
site
positional arguments:
site the full site address, with the scheme
options:
-h, --help show this help message and exit
--out-dir OUT_DIR where to put the pages; the directory must be new or
empty
--sitemap SITEMAP sitemap URL; by default from robots.txt, otherwise
/sitemap.xml
--limit LIMIT how many pages to fetch, 500 by default; 0 means all,
only together with --all
--all fetch every page in the sitemap, with no cap
--delay DELAY pause between requests of one worker, in seconds
--jobs JOBS how many requests run at once, 1 to 16
--crawl follow links too: from the home page and the sitemap
addresses, breadth first; shows pages missing from the
sitemap and sitemap addresses no link leads to
--render save the DOM an installed Chrome or Chromium rendered
instead of the raw HTML — for pages that JavaScript
draws
--browser PATH path to the browser for --render when it is not found
on its own
--browser-no-sandbox run the browser without its sandbox — only in a
throwaway container as root