Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

205
Vistas
How do i select <a> with aria-label in cheerio?

I am currently building a scraper which scrapes data from newspaper sites based on the keyword I am looking for, such as "environment" and "climate". But I have recently encountered a site where I couldn't simply check if the text has my desired keywords. Its HTML is written in this way

<a aria-label="Ravaged by floods, Bangladesh pitches plan to adapt to climate impacts" class="card-with-image-zoom" href="https://en.prothomalo.com/environment/climate-change/ravaged-by-floods-bangladesh-pitches-plan-to-adapt-to-climate-impacts">

Here is how i am looking for keywords using cheerio-

 const html = response.data;
            const $ = cheerio.load(html);
            const specificarticles = [];
$('a:contains("climate"),a:contains("environment")',HTML)

How do i check the keyword availability of this specific HTML using cheerio?

about 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

If it uses normal selectors, try

$("a[aria-label]") 

for all and

$("a[aria-label*=Bangladesh]") 

for example to get one with the word Bangladesh in it

about 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda