Thread with 3 posts
jump to expanded postThanks to Google Apps Script and this project, this link now grabs a random SiIvaGunner video. And here's all the code I used to do it:
function doGet(e) {
const VIDEO_STATUS = 3;
const videoList = SpreadsheetApp.openById("1B7b9jEaWiqZI8Z8CzvFN1cBvLVYwjb5xzhWtrgs4anI").getSheetByName("SiIvaGunner");
const filteredList = videoList.getDataRange().getValues().filter((video) => video[VIDEO_STATUS] == "Public");
const randomVideo = filteredList[Math.floor(Math.random() * filteredList.length)];
return ContentService.createTextOutput(`https://youtu.be/${randomVideo[0]}`);
}
@lexevo is this free to use? think i might have a friend who is interested
@callmore Yep! The link should just work for anyone