How can I get top artist youtube data API v3

孤者浪人 提交于 2019-12-10 12:23:25

问题


I am using Youtube API V3 to fetch top artist from youtube API for my Android app. I want to show Top Artists for each country. Any idea how can I retrieve the list of top Artists from Youtube API. located hear https://www.youtube.com/yt/artists/charts.html


回答1:


No, it's not possible to get the artist list via youtube data api. Because the acceptable "type" values for search.list() does not have artist resource:

Doc say:

Acceptable values are: channel, playlist, video

The only way I can think of is to scrap the data of that web page https://artists.youtube.com/charts/artists




回答2:


I'm not sure about this but give it a try, use Search:list which returns a collection of search results that match the query parameters specified in the API request. By default, a search result set identifies matching video, channel, and playlist resources, but you can also configure queries to only retrieve a specific type of resource. Include regionCode and type paramenter.

The regionCode parameter instructs the API to return search results for the specified country. The parameter value is an ISO 3166-1 alpha-2 country code.

The type parameter restricts a search query to only retrieve a particular type of resource. The value is a comma-separated list of resource types. The default value is video,channel,playlist.

Note: A call to this method has a quota cost of 100 units.



来源:https://stackoverflow.com/questions/40858912/how-can-i-get-top-artist-youtube-data-api-v3

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!