How to programmatically find out what channels are part of a given YouTube network?

后端 未结 2 1190
生来不讨喜
生来不讨喜 2020-12-31 14:43

Looks like there is no official YouTube API to find list of YouTube networks or what channels are part of a given network. Any ideas how to find that information?

If

相关标签:
2条回答
  • 2020-12-31 14:53

    It doesn't look like you can get this information using the v3 API at this time, but I believe what socialblade is calling networks is the content owner or 'Partner Name'.

    In an API response, a feed entry contains a partner video if the entry contains a <media:credit> tag for which the value of the yt:type attribute is partner. <media:credit role='uploader' scheme='urn:youtube' yt:display='partner_name' yt:type='partner'>partner_name</media:credit>

    Described here: https://developers.google.com/youtube/2.0/reference#Video_Feeds

    It's probably just a matter of assigning channels which only contain videos by a distinct partner to that partner's 'network'. (Or just as likely any videos.)

    Edit: Since that demonstrably appears not to be accurate, I'll point out that it appears the analytics API does have that information, but from the description it sounds like it only allows reports on channels your own "network". That being said, SocialBlade has to be getting their information about other networks from somewhere:

    Content owners who participate in the YouTube Partner Program can also use the API to retrieve reports that aggregate Analytics data for all YouTube channels that are linked to their content owner account.

    0 讨论(0)
  • 2020-12-31 14:54

    I don't know if this is the way sites such as socialblade or channelmeter get the networked channels. But this is the way i did it.

    Say i visit this video link: http://www.youtube.com/watch?v=_8AZT40gH5E

    In the meta tags information of a networked channel, there is an attribute <meta name=attribution content=JamieOliver/> (As example) which actually specifies the network that channel belongs to. So what i did was one video from the channel i'm working with, and use a small function like this:

    $tags = get_meta_tags("http://www.youtube.com/watch?v=_8AZT40gH5E");
    echo $network = $tags['attribution'];
    

    And you have the Network the channel is associated with.

    0 讨论(0)
提交回复
热议问题