Company logo
  • Empleos
  • Bootcamp
  • Acerca de nosotros
  • Para profesionales
    • Inicio
    • Empleos
    • Cursos y retos
    • Preguntas
    • Profesores
    • Bootcamp
  • Para empresas
    • Inicio
    • Nuestro proceso
    • Planes
    • Pruebas
    • Nómina
    • Blog
    • Comercial
    • Calculadora

0

82
Vistas
Scrapping data with puppeteer in Nodejs, Results are different

I want to scrap the text '1 views' from this URL "https://www.loom.com/share/5b920dc1375f43fa9b622ac0a6ba7c52"
Url of image: https://imgur.com/r8dbUbV

In browser console it gives result perfectly
Url of image: https://imgur.com/Z4XrR3f

but in puppeteer it gives 'Record a loom'
Url of image: https://imgur.com/zL1varD

7 months ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

I noticed a similar issue when trying different browsers. Your selector worked fine for me in Firefox, but not in Chrome. I'm assuming you are using Chrome with Puppeteer, as it is the default. If that's the case we are likely seeing the same issue. Anyway, try this selector out instead:

document.querySelector(`[class*="header-content"] span:nth-child(2)`)

Happy scraping, and cheers!

7 months ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos