I'm working on a simple google script for a spreadsheet that will go down a column in the sheet and update the column next to it based on information pulled from links in the original column.
The problem is that the same output is being output regardless of the input column. My code is here:
function idThatSucka() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var range = ss.getRange("F2:F20");
for (var y = 1; y <= range.getHeight(); y++) {
var logCell = ss.getRange("E"+y+":E"+y);
var url = ss.getRange("F"+y+":F"+y).getValue();
if (url){
var response = UrlFetchApp.fetch(url);
Logger.log(response.getContentText());
var theLog = Logger.getLog();
var start = theLog.split('</title>')[0];
var output = start.split('Steam Community :: ')[1];
logCell.setValue(output);
}
}
}
I suspect that "url" might not be updating, but nothing I've tried so far has fixed the problem.