Is is possible to get a Channels social links with the Youtube API

谁都会走 提交于 2019-12-07 04:44:24

问题


On a Youtube channel page there are links of to related sites. Is it possible to get these through the Youtube API or will I have to parse the page.


回答1:


Unfortunately 'related sites' are not provided in API, even in "https://developers.google.com/youtube/v3/docs/channels#snippet.description"




回答2:


I created a very simple Java-API which can get the related sites from a Youtube channel. It will return all the URLs and the link texts. You can even filter out the links for a specific website or social network.

YoutubeRelatedSites yrs = new YoutubeRelatedSites(new URL("https://www.youtube.com/user/WatchMojo/about?&ab_channel=WatchMojo.com"));
Map map = yrs.getLinks(); //Get all related sites
URL[] twitterLinks = yrs.getTwitter(); //Get all twitter links

Download the source code here: https://github.com/Grunzwanzling/YoutubeRelatedSites



来源:https://stackoverflow.com/questions/14926962/is-is-possible-to-get-a-channels-social-links-with-the-youtube-api

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