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

230
Visualizações
Cheerio doesn't detect table cells when using CSS selectors

just hoping someone could help me out.

I'm trying to use Cheerio to pull a list of values from some table cells found on this webpage: https://www.dextools.io/app/bsc/pool-explorer. Specifically the token column of the table.

However when I use Cheerio to do this, I keep getting empty results after querying the page.

I've initialised Cheerio with valid HTML data pulled from Axios, and I'm getting the exact selectors using Chrome dev tools. So I'm not too sure why this isn't working.

I've tried a bunch of selectors including:

datatable-body-cell (tag)
.datatable-body-cell-label
body > app-root > div.container-fluid.icon-sidebar-nav.ng-tns-c62-0 > div > main > app-exchange > div > app-poolscreator > app-layout > div > div > div:nth-child(2) > div > div > div.card-body.p-0.pb-3 > ngx-datatable > div > datatable-body > datatable-selection > datatable-scroller > datatable-row-wrapper:nth-child(1) > datatable-body-row > div.datatable-row-center.datatable-row-group.ng-star-inserted > datatable-body-cell:nth-child(1) > div

Script

import * as cheerio from "cheerio";
import axios from "axios";

async function run(){
    let html = await axios.get('https://www.dextools.io/app/bsc/pool-explorer');
    const $ = cheerio.load(html.data);

    let x = $('.datatable-body-cell');

    let table = $('.datatable-body-cell').toArray().map(x => {
        console.log($item.text());
    })
    
    console.log(table);
}

run();
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