I am trying to build a crawler, but the website opening page is veryyy slow.. it loads some opening and after that a lot of images and I aways get some selector timeout before the page finishs to load.

皇冠hg0088代理网址the website is

皇冠hg0088代理网址How can I improve the performance disabling images and other heavy components?

 await page.setRequestInterception(true)
page.on('request', (request) => {
  const typesToAbort = ['media', 'font', 'image']
  const resourceType = request.resourceType()
  if (typesToAbort.includes(resourceType)) request.abort()
  else request.continue()

I wrote this code, but if I apply this, the webpage keeps loading forever the first "opening" (the quick opening before the main webpage with fields of "CPF", "SENHA" etc... The same problem happens if i disable imagens in Chrome and try to load the page

| |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.