Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I created a node file that will scrape the provided url: https://www.billboard.com/charts/rap-song and print all artists & songs that are sung by the specified artists
I created a node file that will scrape the provided url: https://www.billboard.com/charts/rap-song and print all artists & songs that are sung by the specified artists given via the command line. however for some reason it's not printing out the correct answer.
This is my code
When I typed
$ node final.js migos
from command
it prints out
It supposed to print out -
Migos:Stir Fry
var artist -process.argv [2]; String (artist); var song: var request require( 'request) var cheerio require( 'cheerio') request('https://www.billboard.com/charts/rap-song', function (error, response, htmt if (error&& response.statusCode200) var $ = cheerio.load (htmU); ('a.chart-row artist').each(function(i, element) console.log(artist""+$(this).text().trim)); elset console.log("nope didn reach")Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started