Advertisement
dereksir

Untitled

Mar 15th, 2024 (edited)
615
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.67 KB | None | 0 0
  1. namespace TwoCaptcha
  2. {
  3.     public class Scraper
  4.     {
  5.         static void Main(string[] args)
  6.         {
  7.             //...
  8.  
  9.             // declare solution variable
  10.             string solution = null;
  11.  
  12.             try
  13.             {
  14.                 // call the Solve method to solve the ReCaptcha
  15.                 solver.Solve(captcha).Wait();
  16.                 solution = captcha.Code;
  17.  
  18.                 // print the captcha solution
  19.                 Console.WriteLine("Captcha solved: " + solution);
  20.             }
  21.             catch (AggregateException e)
  22.             {
  23.                 // if an error occurs during captcha solving, catch the AggregateException and print the error message
  24.                 Console.WriteLine("Error occurred: " + e.InnerExceptions.First().Message);
  25.             }
  26.         }
  27.     }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement