Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace TwoCaptcha
- {
- public class Scraper
- {
- static void Main(string[] args)
- {
- //...
- // declare solution variable
- string solution = null;
- try
- {
- // call the Solve method to solve the ReCaptcha
- solver.Solve(captcha).Wait();
- solution = captcha.Code;
- // print the captcha solution
- Console.WriteLine("Captcha solved: " + solution);
- }
- catch (AggregateException e)
- {
- // if an error occurs during captcha solving, catch the AggregateException and print the error message
- Console.WriteLine("Error occurred: " + e.InnerExceptions.First().Message);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement