Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

When I typed

$ node final.js migos

from command

it prints out

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Practical Neo4j

Authors: Gregory Jordan

1st Edition

1484200225, 9781484200223

More Books

Students also viewed these Databases questions

Question

write selection sort for linked list

Answered: 1 week ago