Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

288
Views
JS Cheerio scraping dont work in node, but work fine in console on website

I am scraping some data from a webiste using cheerio. I get the output I want in the console, but not in my node.

I am scraping the price on this website: https://www.coindesk.com/price/bitcoin-sv/

In the console, this is working: $('div[class="sc-bxivhb cNnmSt"] span[class="Typography__StyledTypography-sc-1xaoczh-0 euSZAS"]').textContent

When I run it in the node I write: $('div[class="sc-bxivhb cNnmSt"] span[class="Typography__StyledTypography-sc-1xaoczh-0 euSZAS"]').text() but its not working.

Anyone know why?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

The page you are trying to scrape is generated with JavaScript. If you look into view-source:https://www.coindesk.com/price/bitcoin-sv/ you will look mostly JavaScript and not so much HTML. cheerio cannot run JavaScript, it just parses static source code.

You need something like https://github.com/puppeteer/puppeteer to get JS-generated content.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!