python - YouTube分析

标签 python django youtube youtube-api

我需要从YouTube获取用户的收入详细信息

我按照以下网址获取收入

https://developers.google.com/youtube/analytics/sample-requests#Content_Owner_Reports

我通过了如下请求

GET https://www.googleapis.com/youtube/analytics/v1/reports?ids=channel%3D%3D*******************&start-date=2014-05-01&end-date=2014-06-30&metrics=earnings&key={YOUR_API_KEY}

但结果是
{
 "error": {
  "errors": [
   {
    "domain": "global",
    "reason": "unauthorized",
    "message": "Insufficient permission to access this report."
   }
  ],
  "code": 401,
  "message": "Insufficient permission to access this report."
 }
}

我的问题是:
  • 我的要求正确吗?
  • 如何通过YouTube API获得收入?
  • contentOwner==OWNER_NAME如何为YouTube CMS获取OWNER_NAME?
  • 什么是YouTube CMS?
    请帮我
  • 最佳答案

    直接从您发布的链接:Sample API Requests

    You also have to be authenticated as the specified channel or content owner so that the APIs Explorer can authorize your API requests using OAuth 2.0.



    您第一个问题的答案是:没有您的请求不正确。您需要先经过身份验证,然后才能访问数据。 Implementing OAuth 2.0 Authorization

    另外:YouTube内容管理器(CMS)

    关于python - YouTube分析,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27309926/

    相关文章:

    android - 与ConstraintLayout中的 fragment 一起使用时,Textview不可见

    youtube - 如何从youtube的HTML5版本获取HTML5视频URL?

    jquery - 如何在jQuery中加载YouTube视频?

    python - 导入错误: No module named _multiprocessing

    php - 处理 csv、bash、php、c/c++ 的最快处理速度

    python - 辅助计算机上的 Pandas 出现异常

    css - 将变量传递给 Django 中的 CSS 文件

    python - Django 简单 JWT non_field_errors":["No active account found with the given credentials]

    python - 如何找到第一次出现的元素第二次出现的时间?

    python - 测试从 Django 中的数据库获取选择的表单 - 不允许数据库访问