如何从 YouTube 获取频道 ID? [英] How can I get a channel ID from YouTube?
问题描述
我正在尝试使用 YouTube Data API V3 从我的频道检索数据.
为此,我需要我的频道 ID.
我试图从我的 YouTube 帐户中找到我的频道 ID,但我在各个方面都失败了.
如果有人给我一个提示,我会非常高兴.
这是我用来检索数据的 URL:
https://www.googleapis.com/youtube/v3/channels?id=fjTOrCPnAblTngWAzpnlMA&key={YOUR_API_KEY}&part=snippet,contentDetails,statistics
ID 用于频道 ID,键,我将用我在 Google API 控制台生成的 API KEY 替换 {YOUR_API_KEY}.>
我的频道 ID 不是:
- klauskkpm
- 克劳斯马查多
- klausmachado@gmail.com
- fjTORCPnAblTngWAzpnlMA
我的频道是:http://www.youtube.com/user/klauskkpm
要获取频道 id 可以查看频道页面的源代码并找到 data-channel-external-id="UCjXfkj5iapKHJrhYfAF9ZGg"
或 "externalId":"UCjXfkj5iapKHJrhYfAF9ZGg"
.
UCjXfkj5iapKHJrhYfAF9ZGg
将是您要查找的频道 ID.
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 from my YouTube account, and I failed in every single way.
If anyone have a single tip for me, I would be incredible glad.
This is the URL that I'm using to retrieve the data:
https://www.googleapis.com/youtube/v3/channels?id=fjTOrCPnAblTngWAzpnlMA&key={YOUR_API_KEY}&part=snippet,contentDetails,statistics
The ID is for the channel ID, and the key, I'm replacing the {YOUR_API_KEY} with my API KEY generated at my Google API console.
My channel ID is not:
- klauskkpm
- klausmachado
- klausmachado@gmail.com
- fjTOrCPnAblTngWAzpnlMA
My channel is: http://www.youtube.com/user/klauskkpm
To obtain the channel id you can view the source code of the channel page and find either data-channel-external-id="UCjXfkj5iapKHJrhYfAF9ZGg"
or "externalId":"UCjXfkj5iapKHJrhYfAF9ZGg"
.
UCjXfkj5iapKHJrhYfAF9ZGg
will be the channel ID you are looking for.
这篇关于如何从 YouTube 获取频道 ID?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!