【问题标题】:get all channel info with youtube api and curl使用 youtube api 和 curl 获取所有频道信息
【发布时间】:2020-02-19 10:38:57
【问题描述】:

大家好,我正在阅读 youtube api 文档并在这里看到了这个 json sn-p:https://developers.google.com/youtube/v3/docs/channels#resource-representation

我看到了这个并想从我的 curl 代码中的指定 youtube 频道获取所有这些信息。到目前为止,我写的是这样的:

curl "https://www.googleapis.com/youtube/v3/channels?part=statistics&id=[CHANNEL NAME]&key=[API KEY]"

但这只回馈了 json 的一小部分,我认为它是“统计”部分。

如果你们能帮忙就太好了,谢谢。

【问题讨论】:

    标签: json curl youtube youtube-data-api


    【解决方案1】:

    要获取附加到给定频道的其他信息,请通过part 参数提及您感兴趣的一组属性,由reference doc 指定。

    更新:

    要获取所有可用信息,要传递给 curl 的 URL 将是:

    https://www.googleapis.com/youtube/v3/channels?part=brandingSettings,contentDetails,contentOwnerDetails,id,localizations,snippet,statistics,status,topicDetails&id=[CHANNEL NAME]&key=[API KEY]
    

    请注意,part 参数不包含 auditDetails,因为这需要额外的权限。

    【讨论】:

    • 感谢朋友,但是知道什么是使输出最详细的必要条件。对不起,我是 youtube api 的新手
    猜你喜欢
    • 1970-01-01
    • 2013-01-16
    • 2015-07-16
    • 2020-10-22
    • 2021-01-23
    • 2013-06-02
    • 2016-03-01
    • 2016-08-05
    • 2016-02-25
    相关资源
    最近更新 更多