For my application I need to retrieve a channel's ID, which can be done using a channel's username via channels().list(..., forUsername=username, ...)
.
The issue I have is that a channel's username is not as obvious as you would think. For example, talkSPORT's channel's username is actually talkSPORTMagazine. The only way I have been able to extract this is from their main page's URL.
However, a channel's main page's URL does not reliably include their username: sometimes it does, sometimes it includes their ID, or sometimes nothing at all.
If I don't use a channel's actual username then I cannot extract their channelID
, something I need to request videos.
Is there a way I can reliably find a channel's username?