Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

80
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda