YouTube&验证码

时间:2013-03-18 17:48:48

标签: c# youtube captcha

我使用以下内容创建了一个YoutubeRequest:

settings = New YouTubeRequestSettings("appname", devkey", user, pass)
request = New YouTubeRequest(settings)

但有时候我有CaptchaRequiredException。如何处理此异常并获取验证码URL / IMG等,任何人都可以帮忙,我使用c#?感谢

1 个答案:

答案 0 :(得分:0)

try
{
    settings = new YouTubeRequestSettings("appname", devkey", user, pass);
    request = new YouTubeRequest(settings);
}
catch (CaptchaRequiredException ex)
{
    //do something with ex.Url and ex.Token
}

请参阅Google's documentation