html - How to get sub attribute value using cheerio in javascript -
i using cheerio library data scraping. trying value of tag using below
var sparkline = $(this) .find("td") .eq(7).text;
html
<td><a href="/currencies/bitcoin/#charts"><img class="sparkline" alt="sparkline" src="https://files.coinmarketcap.com/generated/sparklines/1.png"></a></td>
it returns undefined there no value of td tag , child tag. know how img src value here ?
it works below html
var sparkline = $(this) .find("td") .eq(6).text;
html
<td class="no-wrap percent-24h negative_change text-right" data-usd="-4.85" data-btc="0.00" >-4.85%</td>
Comments
Post a Comment