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

60
Vistas
cheerio not picking up particular elements

Hi trying to use cheerio to scrape this https://davesgarden.com/guides/pf/finder/index.php?sname=Hibiscus&page=1 , and can access some elements such as the menu items, but not the plant names which i need. Im using this code to try get the plant names

const $ = cheerio.load(data);

$('#contAfterAds > div > div.plant-info > div > a').each((_idx, el) => {
            const postTitle = $(el).text()
            postTitles.push(postTitle)
        });

but no luck, any suggestions? Ive seen that angular sites cant be scraped, could it be a similar problem?

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

0

It's a sibling:

$(el).next().text()

or possibly:

$(el).next().next().text()
7 months ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos