📅  最后修改于: 2022-03-11 14:56:02.677000             🧑  作者: Mango
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.");