0

UPDATE: apparently this only happens when fetching videos from a playlist feed, which is what I'm doing.

I recently noticed my youtube api requests for videos were returning blank keyword entries. I found the blog post at http://apiblog.youtube.com/2012/08/video-tags-just-for-uploaders.html, and I'm already sending requests as the channel/video owner, yet I still get blank keywords. This has the undesirable side-effect of deleting existing keywords if I make any changes to the video details, such as to descriptions or titles.

For instance, I have video series where every video will have the same description. Perfect place to use the API to run through all the vids in a list and update their details. This used to work fine. But one ill-fated day, this routine became destructive. Any time I do this now, the keywords get blanked out, and I have to go back through all of the affected vids, replacing the lost keywords by hand. I've stopped using my API-based utility since this began happening.

The descriptions and titles will get updated as desired, but the keywords get blanked out, even if I don't touch them. I recall reading somewhere in the API docs something to the effect that when you submit updates for video details, any entries not filled in will be erased. In this instance, because the keyword entries I get back are already blank, any updates I do to the video other than to the keywords cause the keywords to be deleted.

Anybody have any ideas or workarounds? If I can't continue using the API to manage keywords, I would at least like to be able to continue making updates to titles and descriptions, but that won't work right now because the keywords get deleted with any title or description updates :(

4

2 回答 2

1

media:keywords当您对当前帐户中的视频或视频提要发出经过身份验证的请求时,YouTube API 绝对应该返回。你可以自己测试一下

http://gdata.youtube.com/demo/index.html

单击Authenticate此处,然后请求Uploads -> Query,然后输入default用户名。运行该请求并查看响应 - 所有实际具有关键字的视频都应该media:keywords为它们返回。(显然,如果您已经删除了给定视频的关键字,它们将不会被返回,因此请使用您已为其设置关键字的新上传视频进行测试。)

我认为有一个内部错误仍然存media:keywords​​在,当您获取播放列表提要时,该错误会阻止在播放列表条目中返回。您是否正在从播放列表中阅读您的视频?

于 2012-10-18T04:07:31.630 回答
0

实际上,这是一个已知问题,因为 YouTube 决定只允许经过身份验证的用户检索关键字。

这很烦人,但我目前也在寻找一种安全的方式来检索这些关键字,使用 Zend,而不用纯文本写下我的密码。

让我们一起寻找解决方案:)

YOUTUBE API : 检索视频关键字

于 2012-10-16T14:49:53.483 回答