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