Closed Vance-ng-vn closed 6 months ago
It seems like the error disappeared when I replaced the configs like this: (and I assume that's http2: false )
let gotConfig = {
headerGeneratorOptions:{
browsers: [
{
name: 'firefox',
minVersion: 102,
maxVersion: 120
}
],
devices: ['desktop'],
operatingSystems: ['linux']
},
timeout: {
request: 15000
},
retry: {
limit: 2,
statusCodes: [409, 429],
calculateDelay: ({attemptCount, retryOptions, error}) => {
if(attemptCount > retryOptions.limit) return 0;
if(error.code == 'ECONNRESET') return 1000; //unknow error ...
//default
return 1500; //too many request
}
},
http2: false
}
The server's network is good, I checked it continuously:
And here is my code:
docker: alpine:3.17.5 nodejs: 18.18.2
got-scraping: 4.0.0/4.0.1/4.0.2