First actual commit
added sources to repository
This commit is contained in:
17
RedditSharp/ConsoleCaptchaSolver.cs
Normal file
17
RedditSharp/ConsoleCaptchaSolver.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
|
||||
namespace RedditSharp
|
||||
{
|
||||
public class ConsoleCaptchaSolver : ICaptchaSolver
|
||||
{
|
||||
public CaptchaResponse HandleCaptcha(Captcha captcha)
|
||||
{
|
||||
Console.WriteLine("Captcha required! The captcha ID is {0}", captcha.Id);
|
||||
Console.WriteLine("You can find the captcha image at this url: {0}", captcha.Url);
|
||||
Console.WriteLine("Please input your captcha response or empty string to cancel:");
|
||||
var response = Console.ReadLine();
|
||||
CaptchaResponse captchaResponse = new CaptchaResponse(string.IsNullOrEmpty(response) ? null : response);
|
||||
return captchaResponse;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user