【发布时间】:2019-12-21 07:57:20
【问题描述】:
我正在尝试从 YouTube 分析 API 中获取仅用于嵌入视频的数据。
当我使用“insightPlaybackLocationType==EMBEDDED”过滤器时,我收到不支持查询的响应。如果没有此过滤器,查询将返回没有任何错误的响应。
response = self.executeAPIRequest(
yt_instance.reports().query,
ids="channel==" + c_id,
startDate=startdate,
endDate=enddate,
metrics="views,likes,dislikes,comments,shares,estimatedMinutesWatched,averageViewDuration,averageViewPercentage",
sort='-views',
filters="video==VIDEO_ID_HERE;insightPlaybackLocationType==EMBEDDED",
maxResults=200,
)
这是我得到的错误:
googleapiclient.errors.HttpError:https://youtubeanalytics.googleapis.com/v2/reports?ids=channel%3D%CHANNEL_ID_HERE&startDate=2017-02-28&endDate=2019-08-11&metrics=views%2Clikes%2Cdislikes%2Ccmets %2Cshares%2CestimatedMinutesWatched%2CaverageViewDuration%2CaverageViewPercentage&sort=-views&filters=video%3D%VIDEO_ID_HERE%3BinsightPlaybackLocationType%3D%3DEMBEDDED&maxResults=200&alt=json 返回“不支持查询。请查看https://developers.google.com/youtube/analytics/v2/available_reports 的文档以获取支持的查询列表。” >
【问题讨论】: