I am looking for a solution to accurately measure Youtube Startup delay and rebuffering events from the Chrome web browser. I wish to ideally leverage the selenium automation-based python script to repeat the experiment for a large number of YouTube videos to get the measurements. Below is a piece of code I started with, however, it doesn't return any meaningful figures. Must be, I am missing something. Am I on the right track? Any help would be appreciated.
driver = webdriver.Chrome(service=s, options=options)driver.get("https://www.youtube.com/<example-video-id>")sleep(5)player_status = driver.execute_script("return document.getElementById('movie_player').getPlayerState()")