function roster(url) {
var url = "https://keeptradecut.com/dynasty/power-rankings/team-breakdown?leagueId=1052466327954309120&platform=2&team=697884463404740600";
var response = UrlFetchApp.fetch(url);
var content = response.getContentText();
var parsed = getRoster(content);
return parsed;
}
function getRoster(content) {
var $ = Cheerio.load(content);
var data = [];
$('.tb-roster').each(function(i, playerData) {
var playerDataArray = [];
var playerNameWithTeam = $(playerData).find('.team-player-name');
playerDataArray.push(playerNameWithTeam);
data.push(playerDataArray);
});
console.log(data);
return data;
}
I’m looking to mass import roster data but this is a hold up.