1

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

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

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

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

4

1 回答 1

0

您可以尝试使用此代码

    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");
     }
于 2012-09-04T17:16:54.467 回答