-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathLeminOptionsExample.java
More file actions
29 lines (23 loc) · 938 Bytes
/
LeminOptionsExample.java
File metadata and controls
29 lines (23 loc) · 938 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package examples;
import com.twocaptcha.TwoCaptcha;
import com.twocaptcha.captcha.Lemin;
public class LeminOptionsExample {
public static void main(String[] args) {
TwoCaptcha solver = new TwoCaptcha(args[0]);
solver.setSoftId(0);
solver.setDefaultTimeout(120);
solver.setRecaptchaTimeout(600);
solver.setPollingInterval(10);
Lemin captcha = new Lemin();
captcha.setСaptchaId("CROPPED_d3d4d56_73ca4008925b4f83a8bed59c2dd0df6d");
captcha.setUrl("https://mysite.com/page/with/LeminCaptcha");
captcha.setApiServer("api.leminnow.com");
captcha.setProxy("HTTPS", "login:password@IP_address:PORT");
try {
solver.solve(captcha);
System.out.println("Captcha solved: " + captcha.getCode());
} catch (Exception e) {
System.out.println("Error occurred: " + e.getMessage());
}
}
}