You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -174,25 +179,6 @@ The mode option defaults to async .
174
179
175
180
If there is an interval time set, it is necessary to wait for the interval time to end before sending the request.
176
181
177
-
#### Set interval time
178
-
179
-
Setting the interval time can prevent too much concurrency and avoid too much pressure on the server.
180
-
181
-
```js
182
-
importxCrawlfrom'x-crawl'
183
-
184
-
constmyXCrawl=xCrawl({
185
-
intervalTime: { max:3000, min:1000 }
186
-
})
187
-
```
188
-
189
-
The intervalTime option defaults to undefined . If there is a setting value, it will wait for a period of time before requesting, which can prevent too much concurrency and avoid too much pressure on the server.
190
-
191
-
- number: The time that must wait before each request is fixed
192
-
- Object: Randomly select a value from max and min, which is more anthropomorphic
193
-
194
-
The first request is not to trigger the interval.
195
-
196
182
#### Multiple crawler application instances
197
183
198
184
```js
@@ -223,9 +209,9 @@ Crawl interface data through [crawlData()](#crawlData)
Setting the requests interval time can prevent too much concurrency and avoid too much pressure on the server.
244
+
245
+
```js
246
+
importxCrawlfrom'x-crawl'
247
+
248
+
constmyXCrawl=xCrawl({
249
+
intervalTime: { max:3000, min:1000 }
250
+
})
251
+
```
252
+
253
+
The intervalTime option defaults to undefined . If there is a setting value, it will wait for a period of time before requesting, which can prevent too much concurrency and avoid too much pressure on the server.
254
+
255
+
- number: The time that must wait before each request is fixed
256
+
- Object: Randomly select a value from max and min, which is more anthropomorphic
257
+
258
+
The first request is not to trigger the interval.
259
+
260
+
### Multiple ways of writing requestConfig options
261
+
262
+
The writing method of requestConfig is very flexible, there are 5 types in total, which can be:
0 commit comments