【问题标题】:How to get python code samples on Youtube API V3 with API KEY only如何仅使用 API KEY 在 Youtube API V3 上获取 python 代码示例
【发布时间】:2020-05-31 04:40:26
【问题描述】:

我想获取有关使用 API KEY 与 Google 的 Youtube API V3 交互并获取特定频道的视频列表的 python 示例,我不想使用 OAuth,我想使用 API KEY 凭据。

API 资源管理器显示两种凭据类型,但代码示例仅使用 OAuth 方法。

我想要一个 python 脚本列出频道发布的视频。

【问题讨论】:

    标签: google-apis-explorer youtube-api


    【解决方案1】:

    我终于从 here 的 python pakcage google-api-client 的文档中找到了如何做到这一点。

    这是构建服务的方法:

    youtube = googleapiclient.discovery.build(
                   api_service_name, 
                   api_version, 
                   developerKey='YOUR_API_KEY')
    

    然后该服务将使用提供的 API 向 Google 进行身份验证。

    【讨论】:

      猜你喜欢
      • 2013-01-09
      • 1970-01-01
      • 1970-01-01
      • 2017-07-25
      • 2016-04-14
      • 2016-09-07
      • 1970-01-01
      • 1970-01-01
      • 2014-11-16
      相关资源
      最近更新 更多