Resuming Youtube from a shortcut

This seemed like such a simple use case and it has been a massive headache. All I want is to be able to run a shortcut that gets my watch history and resume the most recent video. Youtube apparently doesn’t render the history page until it actually hits the page, so instead of somer URLS I’m getting a bunch of JS that I can’t dig out the videos from.