我一直在尝试使用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/