How can I get a channel ID from YouTube?

前端 未结 13 1490
梦谈多话
梦谈多话 2020-11-28 19:40

I\'m trying to retrive the data from my channel using the YouTube Data API V3.
For that I need my channel ID.
I\'ve tried to find my channel ID fr

相关标签:
13条回答
  • 2020-11-28 20:36

    Channel id with the current youtube version is obtained very easily if you login to YouYube website and select 'My channel'

    Your channel ID will be displayed on the address bar of your browser

    0 讨论(0)
  • 2020-11-28 20:42

    This website finds a YouTube Channel ID from its URL:

    https://commentpicker.com/youtube-channel-id.php

    0 讨论(0)
  • 2020-11-28 20:43

    https://www.youtube.com/account_advanced now provides both channel and user ids. See also https://developers.google.com/youtube/v3/guides/working_with_channel_ids .

    0 讨论(0)
  • 2020-11-28 20:43

    To get Channel id

    Ex: Apple channel ID

    Select any of the video in that channel

    Select iPhone - Share photos (video)

    Now click on channel name Apple bottom of the video.

    Now you will get channel id in browser url

    Here this is Apple channel id : UCE_M8A5yxnLfW0KghEeajjw

    0 讨论(0)
  • 2020-11-28 20:44

    2017 Update: Henry's answer may be a little off the mark here. If you look for data-channel-external-id in the source code you may find more than one ID, and only the first occurrence is actually correct. Get the channel_id used in <link rel="alternate" type="application/rss+xml" title="RSS" href="https://www.youtube.com/feeds/videos.xml?channel_id=<VALUE_HERE"> instead.

    0 讨论(0)
  • 2020-11-28 20:46

    An alternative to get youtube channel ID by channel url without API:

    function get_youtube_channel_ID($url){
      $html = file_get_contents($url);
      preg_match("'<meta itemprop=\"channelId\" content=\"(.*?)\"'si", $html, $match);
      if($match && $match[1]);
      return $match[1];
    }
    
    0 讨论(0)
提交回复
热议问题