"Execute JavaScript in Chrome" to get the duration of the YouTube video, what went wrong?



YouTubeTime.kmmacros (1.8 KB)

I changed the title, because this isn't about JXA. It's straight JavaScript.

This one worked for me:

document.querySelector("#movie_player > div.ytp-chrome-bottom > div.ytp-progress-bar-container > div.ytp-bound-time-right").innerText;

1 Like

Can you take a screenshot? I used your code, but it is still incorrect.

1 Like

Thank you, it is now running, thank you very much.

1 Like