-
Notifications
You must be signed in to change notification settings - Fork 273
Open
Description
Is your feature request related to a problem? Please describe.
I have a workflow that goes like this:
- Get
channelIdfrom YouTube handle usingv3/channelsYouTube data api - Scrape this
channelIdusingytmusicapi
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]
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels