Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

231
Views
¿Cómo puedo extraer el enlace de una clase específica?
<td class="views-field views-field-title"> <a href="xxxxxxx" class="cat-job-rate recruiter-colorbox-processed"> xxxxxx </a><br> <span class="job-label">Organization:</span> xxxxx | <span class="job-label">xxxxxx:</span> xxxx | <span class="job-label">xxxx:</span> xxxxx </td>

Quiero extraer un enlace de una página web usando cheerio de class="views-field views-field-title" . Hay tantos enlaces a la página web, pero solo quiero extraer de la clase mencionada.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Según el fragmento HTML que compartió, el siguiente fragmento podrá recuperar todos los hipervínculos.

 <!DOCTYPE html> <html> <head> <script> function getHyperlinks() { var parent = document.querySelectorAll(".views-field.views-field-title > a"); for(let i = 0; i < parent.length; i++) { console.log(parent[i].getAttribute("href")) } } </script> </head> <body> <h2>My First JavaScript</h2> <table> <td class="views-field views-field-title"> <a href="xxxxxxx" class="cat-job-rate recruiter-colorbox-processed">xxxxxx</a> <br><span class="job-label">Organization:</span> xxxxx | <span class="job-label">xxxxxx:</span>xxxx | <span class="job-label">xxxx:</span> xxxxx </td> </table> <input type="button" onclick="getHyperlinks();" value="click" /> </body> </html>
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!