const axios = require('axios');
const cheerio = require('cheerio');
const url = '
https://www.benzinga.com/stock/aapl/';
axios(url)
.then(response => {
const html =
response.data;
const $ = cheerio.load(html)
const statsTable = $('#stories-headlines > ul > li');
const topPremierLeagueScorers = [];
statsTable.each(function () {
const author = $(this).find('.author').text();
const date = $(this).find('.date').text();
const url = $(this).find('a').text();
topPremierLeagueScorers.push({
author,
date,
url
});
});
console.log(topPremierLeagueScorers);
})