Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

211
Visualizações
Basic javascript webscraper throws error / XPATH not resolved?

I try to write a webscraper with the Puppeteers library. It worked properly on amazon.com - but with another page (coinhall.org) I get an error that I can't resolve. Can anyone point me in the right direction here?

const [el2] = await page.$x('//*[@id="root"]/div/div[4]/div/div[1]/div[1]/div[2]/div[1]/div[2]/div[1]/div[1]');
const txt = await el2.getProperty('textContent');
const rawTxt  = txt.jsonValue();

Error:


const txt = await el2.getProperty('textContent');
                         ^

TypeError: Cannot read properties of undefined (reading 'getProperty')

Seems as if el12 doesn't get its value somehow, right? Double checked the XPATH, it's correct though.

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda