【发布时间】:2012-12-24 22:41:38
【问题描述】:
我在这上面花了将近 10 个小时,但仍然没有运气,只有错误。
我正在尝试使用 c# .net 中的 YouTube API 和 HttpWebRequest 批量删除 2 个视频(我没有使用默认的 api dll)
我将请求(使用 POST)发送到: http://gdata.youtube.com/feeds/api/users/default/uploads/batch?v=2
这是我发送的 xml 请求:
<feed xmlns='http://www.w3.org/2005/Atom'
xmlns:media='http://search.yahoo.com/mrss/'
xmlns:batch='http://schemas.google.com/gdata/batch'
xmlns:yt='http://gdata.youtube.com/schemas/2007'>
<entry>
<batch:operation type="delete"/>
<id>http://gdata.youtube.com/feeds/api/users/default/uploads/Fe-Wzz4thKk</id>
</entry>
</feed>
我收到错误:无效的条目 Id/Uri
我也尝试只发送视频的 ID,但仍然没有成功,只有错误。 我该怎么办?这真的很令人沮丧,因为我找不到任何删除视频(不是播放列表)的示例。
希望有人可以提供帮助。
谢谢! 弗拉德
编辑:
我还尝试将 POST 数据发送到:
http://gdata.youtube.com/feeds/api/videos/batch?v=2
还有数据:
<feed xmlns='http://www.w3.org/2005/Atom'
xmlns:media='http://search.yahoo.com/mrss/'
xmlns:batch='http://schemas.google.com/gdata/batch'
xmlns:yt='http://gdata.youtube.com/schemas/2007'>
<entry>
<batch:operation type="delete"/>
<id>http://gdata.youtube.com/feeds/api/videos/Fe-Wzz4thKk</id>
</entry>
</feed>
这个错误是: 此供稿是只读的
我用优秀的用户记录了它(我测试了上传视频和其他东西并且它有效)。
【问题讨论】:
标签: c# youtube youtube-api