Question: 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

I created a node file that will scrape the provided url: https://www.billboard.com/charts/rap-song

When I typed

$ node final.js migos

from command

it prints out

and print all artists & songs that are sung by the specified

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!