However, I am at a bit of a loss as to how to extract the ad video ID itself.
In the browser inspector, the only places I can find the ad video ID are:
Within the URL for ytp-cued-thumbnail-overlay-image
As adVideoId within var ytInitialPlayerResponse, which itself is within <script nonce="rwc3vYf3vRLEyNQKsJOgig">, where rwc3vYf3vRLEyNQKsJOgig changes with every video.
What would be the best way to extract the advertisement video ID?
Apologies for if I'm going about this the wrong way. I am (very!) new to JavaScript, but interested in learning. Please let me know if I've broken any community rules, or committed any other sort of faux pas. Thanks! :)