Have you tried writing a script with Greasemonkey?
this post was submitted on 16 May 2024
7 points (100.0% liked)
JavaScript
1982 readers
1 users here now
founded 1 year ago
MODERATORS
I'm using Violentmonkey. Is that similar?
Yes. What's the challenge with extracting from the url?
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?