c# - 如何使用.net youtube API直接上传获取上传状态

标签 c# asp.net youtube youtube-api

我一直在尝试使用youtubi API直接上传方法,已经成功上传了视频,但是问题是一些视频在上传后被拒绝(拒绝(违反使用条款))。

如果我阅读了steram(readTOEnd())XML,我需要找到一种在webResponse中跟踪它们的方法

<app:control>
    <app:draft>yes</app:draft>
    <yt:state name='processing'/>
</app:control>

州名称始终显示为“处理中”。
请为我指出正确的方向,您对此有任何想法/经验。

最佳答案

您可以尝试使用此代码

    WebResponse myWebResponse = myWebRequest.GetResponse(); 
    // Obtain a 'Stream' object associated with the response object.
    Stream ReceiveStream = myWebResponse.GetResponseStream();

    Encoding encode = System.Text.Encoding.GetEncoding("utf-8");

     // Pipe the stream to a higher level stream reader with the required encoding format. 
     StreamReader readStream = new StreamReader( ReceiveStream, encode );
     Console.WriteLine("\nResponse stream received");
     Byte[] read = new Byte[256];

     int count = readStream.Read( read, 0, 256 );
     Console.WriteLine("HTML...\r\n");

     if (count > 0) 
     {
           Console.Write("Success Reading");
     }

关于c# - 如何使用.net youtube API直接上传获取上传状态,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12268049/

相关文章:

c# - 如何解析 yaml 字符串

c# - 在 GetIncationList() 之后获取合适的 eventHandler

c# - 将绝对 URL 分配给 webresources.axd 和 Telerik.Web.UI.WebResource.axd

html - 响应式视频默认大小

c# - 使用 LINQ 输出异常消息,包括所有内部函数

c# - 基于匿名类型创建泛型类实例

c# - SignalR 与 Azure 进行横向扩展以实现聊天场景

asp.net - 想要在 ASP.NET web 应用程序中使用 index.aspx 而不是 default.aspx

python - 使用 Python GData API,无法获取可编辑的视频条目

youtube - 我在 YouTube 数据 API v.3 中收到 403 错误 : "domain": "usageLimits", "reason": "ipRefererBlocked",