Use an HTTPS agent to enforce TLS 1.3 in got-scraping/CheerioCrawler

Is there a way to change tls version when scraping with CheerioCrawler?
2 Replies
Hall
Hall3mo ago
Someone will reply to you shortly. In the meantime, this might help:
vicious-gold
vicious-gold3mo ago
hi! you can edit https options in preNavigationHooks, so you could try this:
preNavigationHooks: [
async (crawlingContext, opts: OptionsInit) => {
opts ??= {};
opts.https ??= {};
opts.https.minVersion = 'TLSv1.3';
}
]
preNavigationHooks: [
async (crawlingContext, opts: OptionsInit) => {
opts ??= {};
opts.https ??= {};
opts.https.minVersion = 'TLSv1.3';
}
]

Did you find this page helpful?