Sunday 24 May 2020

cheerio keeps giving me null values

hello everyone i'm learnign web scraping with cheerio and i'm trying my best i have been learning it for two days and some sites work with it and some not i tried using it with some complex sites but it keeps giving me null and i need your help with itconst cheerio = require('cheerio');const request = require('request');function getData() {request('https://www.starbucks.com/menu/drinks/hot-coffees', (err, res, html) => {const $ = cheerio.load(html)const lattes = $('.undefinde')console.log(lattes.html())    })}getData()i tried to use the same methode with covid-19 sites and it worked fine

Submitted May 24, 2020 at 08:34PM by Tom-Wildston

No comments:

Post a Comment