I'm trying to retrieve the thumbnail of a YouTube playlist using Node.js/TypeScript.
I've already tried the YouTube Data API using the playlist endpoint,as well as the https://www.youtube.com/oembed endpoint.
However, both approaches only return the thumbnail of the most recent (or first) video in the playlist.In some cases, though, playlists have a custom thumbnail or logo set by the channel.
For example:https://www.youtube.com/playlist?list=PL_PrOB576HxI0mXdEVlBRpB2zerTAGCss
you can simple reproduce the issue by checking the returned thumbnail from:https://www.youtube.com/oembed?url=https://www.youtube.com/playlist?list=PL_PrOB576HxI0mXdEVlBRpB2zerTAGCss&format=json
Does anyone know how to get that custom playlist thumbnail?I'd prefer to avoid scraping the page if possible.
Thanks in advance!Stefan