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

285
Visualizações
jQuery: Uncaught TypeError: .find is not a function

I'm trying to scrape prices of amazon search results using jQuery, but I keep getting this error "Uncaught TypeError: results[i].find is not a function".

scrape.js


/// example: user searched 'keyboards' on amazon

//grab search result rows from amazon search result page
var results = $('.s-main-slot.s-result-list.s-search-results.sg-row').children;

console.log(results) //htmlCollection(30)[divRow1, divRow2,...,divRow30]

//loop through table results and find child element for price
for (var i=0; i<results.length; i++){
    let r = results[i].find('a-price'); //<--- error
    console.log(r);
};

I've also tried:


//grab search result rows from amazon search result page
var results = $('.s-main-slot.s-result-list.s-search-results.sg-row').children; 

console.log(results) //htmlCollection(30)[divRow1, divRow2,...,divRow30]

//loop through table results and find child element for price
for (var i=0; i<results.length; i++){
    let r = $(results[i]).find('a-price'); //<--- error
    console.log(r);
};

and this.


//grab search result rows from amazon search result page
var results = $('.s-main-slot.s-result-list.s-search-results.sg-row').children;

console.log(results) //htmlCollection(30)[divRow1, divRow2,...,divRow30]

//loop through table results and find child element for price
for (var i=0; i<results.length; i++){
    let r = $(this).find('a-price'); //<--- error
    console.log(r);
};

Same error: .find is not a function. I think the bug is that i'm referencing a DOM object and not a jQuery object, but I can't seem to figure out how to fix that.

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