删除 YouTube 观看稍后播放列表项失败 - 返回 404 [英] DELETEing a YouTube watchLater playlist item failing - returning 404
问题描述
我有代码可以从我的 youtube watchLater 播放列表中删除一个项目.大约两周前,这一切正常 - 现在我从 youtube 收到 404 错误.
这是请求和响应的顺序(当然,身份验证细节被删除了):
获取播放列表项目请求:
<块引用>获取播放列表项响应:
<代码>{项目": [{"id": "V0xsdWU1RUlKTHNjb3hNZ0VrRVpmcV9BLjU2QjQ0RjZEMTA1NTdDQzY="}]}
删除请求:
<块引用>删除https://www.google/apis/playlistItems?id=V0xsdWU1RUlKTHNjb3hNZ0VrRVpmcV9BLjU2QjQ0RjZEMTA1NTdDQzY=
删除回复:
<代码>{错误": {错误":[{"domain": "youtube.playlistItem","reason": "playlistItemNotFound","message": "未找到播放列表项.","locationType": "参数",位置":ID"}],代码":404,"message": "未找到播放列表项."}}
当我通过 youtube 网站查看播放列表时,我可以看到该项目尚未删除.
api 的文档表明我做的一切都是正确的.在调试时,我注意到播放列表项 ID 是一个 base64 编码的字符串;我使用编码和解码的字符串得到 404.
这个问题不限于一个特定的项目;看来我放在 watchLater 播放列表中的任何项目都无法删除.从其他播放列表中删除项目没有任何问题;只有 watchLater 有这个问题.
有人知道发生了什么吗?
编辑(2016 年 10 月):Google 表示稍后观看"播放列表已被弃用.请参阅https://developers.google.com/youtube/v3/revision_history>
该问题已在 google 问题跟踪器中关闭:
<块引用>将此问题标记为已过时,因为稍后观看"播放列表已被弃用.有关详细信息,请参阅修订历史记录:https://developers.google.com/youtube/v3/修订历史
<块引用>
此外,检索播放列表详细信息 (playlists.list) 或频道观看历史记录或稍后观看播放列表的播放列表项 (playlistItems.list) 的请求现在返回空列表.此行为适用于新值 HL 和 WL,以及您的 API 客户端可能已存储的任何观看历史记录或稍后观看播放列表 ID.
i have code that deletes an item from my youtube watchLater playlist. this was working ok up to about two weeks ago - now i'm getting a 404 error from youtube.
here's the sequence of requests and responses (with authentication details stripped, of course):
get playlist items request:
get playlist items response:
{
"items": [
{
"id": "V0xsdWU1RUlKTHNjb3hNZ0VrRVpmcV9BLjU2QjQ0RjZEMTA1NTdDQzY="
}
]
}
delete request:
delete response:
{
"error": {
"errors": [
{
"domain": "youtube.playlistItem",
"reason": "playlistItemNotFound",
"message": "Playlist item not found.",
"locationType": "parameter",
"location": "id"
}
],
"code": 404,
"message": "Playlist item not found."
}
}
when i view the playlist via the youtube web site, i can see that the item hasn't been deleted.
the docs for the api indicate that i'm doing everything correctly. while debugging i noticed that the playlist item id is a base64 encoded string; i get 404 using both the encoded and decoded string.
this issue isn't limited to one particular item; it appears any item i place in my watchLater playlist cannot be deleted. i don't have any issues deleting items from other playlists; only watchLater is having this problem.
anyone have any idea what's going on?
Edit (Oct 2016): Google have said the Watch Later playlist has been deprecated. See https://developers.google.com/youtube/v3/revision_history
The issue is closed in the google issue tracker:
Marking this issue as Obsolete as the Watch Later playlist has been deprecated. Please see the Revision History for details: https://developers.google.com/youtube/v3/revision_history
In addition, requests to retrieve playlist details (playlists.list) or playlist items (playlistItems.list) for a channel's watch history or watch later playlist now return empty lists. This behavior is true for the new values, HL and WL, as well as for any watch history or watch later playlist IDs that your API Client may have already stored.
这篇关于删除 YouTube 观看稍后播放列表项失败 - 返回 404的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!