Created
March 25, 2020 22:16
-
-
Save bhavaniravi/c45e8aa823c78d609dcedefac25529c8 to your computer and use it in GitHub Desktop.
A script to calculate timestamp of youtube playlist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ele = document.getElementsByClassName("style-scope ytd-thumbnail-overlay-time-status-renderer") | |
for(i=0, i<ele.length, i+=){ | |
if (ele[i].tagName == "span"){ | |
label = ele[i].getAttribute("aria-label") | |
times = parseFloat(ele[2].textContent.replace(":", ".").trim()) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment