mevoronin/rucaptcha-client

#1
.NET Client for RuCaptcha service

A small client for the RuCaptcha service

Documentation https://githubmemory.com/repo/mevoronin/rucaptcha-client

Usage example:

Loading captcha and getting a response
Code:
RuCaptchaClient client = new RuCaptchaClient(API_KEY);
string captcha_id = client.UploadCaptchaFile(filename);
string answer = null;
while (string.IsNullOrEmpty(answer))
{
    Thread.Sleep(5000);
    try
    {
        answer = client.GetCaptcha(captcha_id);
    }
    catch (Exception ex)
    {
        Console.WriteLine(ex.Message);
    }
}
In this example, waiting for a response is done in a loop with a 5-second delay.
If the site, instead of the expected word, returns the status CAPTCHA_NOT_READY, etc. the client will throw an exception with matching text.