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

79
Vistas
Javascript - Document Query Selector

I am trying to select the job posting titles and the href for the job postings. Then return response. Can you tell me what I am doing wrong here?

Website: https://epyz.fa.us2.oraclecloud.com/hcmUI/CandidateExperience/en/sites/CX_1/requisitions?location=Jacksonville,%20FL,%20United%20States&locationId=300000002870977&locationLevel=city&mode=location&radius=25&radiusUnit=MI

Here is my last attempt:

  function ExecuteScript() {
    let response = '';
    document.querySelectorAll('h2[data-bind="text: job.title"]').forEach((element, i) => {
      response += element.innerHTML + '\\t' + location.host + element.getAttribute('href') + '\\n';
    });
    return response;
  }

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

First of all, inspect how page structure looks like: each list element (job post) is list item (li) with full-size link (a) inside it. Also each item contain h2 header that represent post title:

li -> a
   -> div -> h2

So to grab both title and link you can iterate through list items and search for target children elements:

Array.from(document.querySelectorAll('li.job-tile')).map(element => ({
 title: element.querySelector('h2.job-tile__title').innerText,
 link: element.querySelector('a.job-tile__show').href
}))

Where

li.job-tile        - list item, post tile actually
h2.job-tile__title - header, post title
a.job-tile__show   - link, post page URL

This snippet will return array of objects with title & links like this:

[
  {
    title: 'Application Engineer (Custom Solutions)', 
    link: 'https://epyz.fa.us2.oraclecloud.com/hcmUI/Candidat…nLevel=city&mode=location&radius=25&radiusUnit=MI'
  },
  {
     title: 'Intern - Custom Solutions (Information Systems)', 
     link: 'https://epyz.fa.us2.oraclecloud.com/hcmUI/Candidat…nLevel=city&mode=location&radius=25&radiusUnit=MI'
  },
  ...
]

Also should be noticed that feed you provided contains paggination (as infinite scroll) so grabbing methods like this one will parse only visible posts (loaded), not all of them.

about 4 years ago · Juan Pablo Isaza 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