How to get youtube video duration

Hi, after using the open command, to open a youtube video, I’m using the commad sourceExtract to search in the source code for the “approxDurationMs”:"*, What can I do to extract the number after, the duration of the video in milisecond.
Is thear another way to get the duration of a youtube video, Thak you for your answer

Can I ask why you need another method?