From 938b5336367fcf7fa677b1fa9eccc23df3e0a938 Mon Sep 17 00:00:00 2001 From: s-pace Date: Wed, 19 Dec 2018 08:31:54 +0100 Subject: [PATCH] update documentation as algolia/docsearch-scraper#431 --- docs/src/config-file.md | 12 ++++++++++-- docs/src/run-your-own.md | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/docs/src/config-file.md b/docs/src/config-file.md index 31fad703..4a5808a1 100644 --- a/docs/src/config-file.md +++ b/docs/src/config-file.md @@ -606,11 +606,19 @@ DocSearch to index all your content. You can override the user agent used to crawl your website. By default, this value is: -`'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_1) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/70.0.3538.110 Safari/537.36'` + +`'Algolia DocSearch Crawler'` + +However, if the crawl of your website requires a browser emulation (i.e. +`js_render=true`), our `user_agent` is: + +`Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/71.0.3578.98 Safari/537.36` + +To override it, from the configuration: ```json { - "user_agent": "DocSearch Bot" + "user_agent": "Custom Bot" } ``` diff --git a/docs/src/run-your-own.md b/docs/src/run-your-own.md index 44d573e2..f5b14fa8 100644 --- a/docs/src/run-your-own.md +++ b/docs/src/run-your-own.md @@ -85,7 +85,7 @@ Now that you have your environment variables set, you can run the crawler according to your config. Running `pipenv shell` will enable your virtual environment. From there, you can -run one crawl with the following command: +run one crawl with the following command: ```sh $ ./docsearch run /path/to/your/config.json