Answers for "get length of list youtube"

0

get length of list youtube

var minutes = [... document.querySelectorAll("ytd-thumbnail-overlay-time-status-renderer > span")]
.reduce((acc, dur) => {
    dur = dur.textContent.trim().split(':');
    return acc + parseInt(dur[0]) * 60 + parseInt(dur[1]);
}, 0) / 60;
alert(Math.floor(minutes / 60) + " hours " + minutes % 60 + " minutes.");
Posted by: Guest on October-06-2021

Browse Popular Code Answers by Language