Skip to content

Instantly share code, notes, and snippets.

@happydeveloper
Forked from egoing/gist:11163965
Created August 14, 2014 03:00
Show Gist options
  • Save happydeveloper/dca3f7dd199ca66f46fb to your computer and use it in GitHub Desktop.
Save happydeveloper/dca3f7dd199ca66f46fb to your computer and use it in GitHub Desktop.
Youtube에서 재생목록의 총재생시간을 알아내는 스크립트
var list = document.getElementsByClassName('pl-video');
var len = 0;
for(var i=0; i<list.length; i++){
len += parseInt(list[i].getAttribute('data-length-in-seconds'));
}
console.log(len/60/60);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment