![](/static/253f0d9b/assets/icons/icon-96x96.png)
![](https://programming.dev/pictrs/image/f1e17c9a-9e9d-4ef2-9fa1-faeb53670701.webp)
What’s the challenge with extracting from the url?
One problem with the first approach is that ytp-cued-thumbnail-overlay-image
does not seem to exist in all cases, so it seems (to me, at least) like an unreliable method.
For the second approach, I’m not sure how one would go about locating the adVideoId
text.
- Should I be trying to automatically search the page HTML for it?
- Should I be trying to figure out where it is ahead of time, and navigate to it via the DOM tree?
- Something else entirely?
As is everyone born between 1965 and 2015, which is quite a few people.