Is your feature request related to a problem? Please describe.
I have a workflow that goes like this:
- Get
channelId from YouTube handle using v3/channels YouTube data api
- Scrape this
channelId using ytmusicapi
The issue happens on step 2, as channelId produced in the first step can lead to channels of different types, which need to be scraped using different methods:
@RammsteinOfficial -> UCYp3rk70ACGXQ4gFAiMr1SQ -> YTMusic.get_artist()
@4tunenocopyrightmusic881 -> UC44hbeRoCZVVMVg5z0FfIww -> YTMusic.get_user()
@LinusTechTips -> UCXuqSBlHAE6Xw-yeJA0Tunw -> YTMusic.get_channel()
Describe the solution you'd like
A method to determine channel type:
YTMusic.get_channel_type(channelId: str) -> ChannelType
Describe alternatives you've considered
If for determining channel type the same request is required as for channel scraping, scraping result can be returned instead of type only:
YTMusic.get_generic_channel(channelId: str) -> tuple[ChannelType, GetArtistResponse | GetUserResponse | GetChannelResponse]
Is your feature request related to a problem? Please describe.
I have a workflow that goes like this:
channelIdfrom YouTube handle usingv3/channelsYouTube data apichannelIdusingytmusicapiThe issue happens on step 2, as
channelIdproduced in the first step can lead to channels of different types, which need to be scraped using different methods:@RammsteinOfficial->UCYp3rk70ACGXQ4gFAiMr1SQ->YTMusic.get_artist()@4tunenocopyrightmusic881->UC44hbeRoCZVVMVg5z0FfIww->YTMusic.get_user()@LinusTechTips->UCXuqSBlHAE6Xw-yeJA0Tunw->YTMusic.get_channel()Describe the solution you'd like
A method to determine channel type:
YTMusic.get_channel_type(channelId: str) -> ChannelTypeDescribe alternatives you've considered
If for determining channel type the same request is required as for channel scraping, scraping result can be returned instead of type only:
YTMusic.get_generic_channel(channelId: str) -> tuple[ChannelType, GetArtistResponse | GetUserResponse | GetChannelResponse]