-
Notifications
You must be signed in to change notification settings - Fork 2
/
capMonster_tasks.go
224 lines (215 loc) · 8.57 KB
/
capMonster_tasks.go
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
package capMonsterTool
//This file reference all CapMonster available Captcha Task Types
//documentation page: https://zennolab.atlassian.net/wiki/spaces/APIS/pages/557229/Captcha+Task+Types
type ImageToTextTask struct {
//Defines the type of the task.
Type string `json:"type"`
//File body encoded in base64. Make sure to send it without line breaks.
//Default value: ImageToTextTask
Body string `json:"body"`
//Name of recognizing module, for example, “yandex“. Alternative way to pass module name and list of all available modules look here
//Default value: yandex
CapMonsterModule string `json:"capMonsterModule"`
}
type NoCaptchaTaskProxyless struct {
//value: NoCaptchaTaskProxyless
Type string `json:"type"`
//Address of a webpage with Google ReCaptcha
WebsiteURL string `json:"websiteURL"`
//Recaptcha website key.
//<div class="g-recaptcha" data-sitekey="THAT_ONE"></div>
WebsiteKey string `json:"websiteKey"`
//not required
//Some custom implementations may contain additional "data-s" parameter in ReCaptcha2 div, which is in fact a one-time token and must be grabbed every time you want to solve a ReCaptcha2.
//<div class="g-recaptcha" data-sitekey="some sitekey" data-s="THIS_ONE"></div>
RecaptchaDataSValue string `json:"recaptchaDataSValue"`
//not required
//Browser's User-Agent which is used in emulation. It is required that you use a signature of a modern browser, otherwise Google will ask you to "update your browser".
UserAgent string `json:"userAgent"`
//not required
//Additional cookies which we must use during interaction with target page or Google.
//Format: cookiename1=cookievalue1; cookiename2=cookievalue2
Cookies string `json:"cookies"`
}
type NoCaptchaTask struct {
//default value: NoCaptchaTask
Type string `json:"type"`
//Address of a webpage with Google ReCaptcha
WebsiteURL string `json:"websiteURL"`
//Recaptcha website key.
//<div class="g-recaptcha" data-sitekey="THAT_ONE"></div>
WebsiteKey string `json:"websiteKey"`
//not required
//Some custom implementations may contain additional "data-s" parameter in ReCaptcha2 div, which is in fact a one-time token and must be grabbed every time you want to solve a ReCaptcha2.
//<div class="g-recaptcha" data-sitekey="some sitekey" data-s="THIS_ONE"></div>
RecaptchaDataSValue string `json:"recaptchaDataSValue"`
//Type of the proxy
//
//http - usual http/https proxy
//https - try this only if "http" doesn't work (required by some custom proxy servers)
//socks4 - socks4 proxy
//socks5 - socks5 proxy
ProxyType string `json:"proxyType"`
//Proxy IP address IPv4/IPv6. Not allowed to use:
//
//host names instead of IPs
//
//transparent proxies (where client IP is visible)
//
//proxies from local networks (192.., 10.., 127...)
ProxyAddress string `json:"proxyAddress"`
//Proxy port
ProxyPort string `json:"proxyPort"`
//not required
//Login for proxy which requires authorizaiton (basic)
ProxyLogin string `json:"proxyLogin"`
//not required
//Proxy password
ProxyPassword string `json:"proxyPassword"`
//not required
//Browser's User-Agent which is used in emulation. It is required that you use a signature of a modern browser, otherwise Google will ask you to "update your browser".
UserAgent string `json:"userAgent"`
//not required
//Additional cookies which we must use during interaction with target page or Google.
//
//Format: cookiename1=cookievalue1; cookiename2=cookievalue2
Cookies string `json:"cookies"`
}
type RecaptchaV3TaskProxyless struct {
//default value: RecaptchaV3TaskProxyless
Type string `json:"type"`
//Address of a webpage with Google ReCaptcha
WebsiteURL string `json:"websiteURL"`
//Recaptcha website key.
//https://www.google.com/recaptcha/api.js?render="THAT_ONE"
WebsiteKey string `json:"websiteKey"`
//Value from 0.1 to 0.9.
MinScore string `json:"minScore"`
//not required
//Widget action value. Website owner defines what user is doing on the page through this parameter. Default value: verify
//
//Example:
//grecaptcha.execute('site_key', {action:'login_test'}).
PageAction string `json:"pageAction"`
}
type FunCaptchaTask struct {
//default value: FunCaptchaTask
Type string `json:"type"`
//Address of a webpage with FunCaptcha
WebsiteURL string `json:"websiteURL"`
//not required
//A special subdomain of funcaptcha.com, from which the JS captcha widget should be loaded.
//Most FunCaptcha installations work from shared domains, so this option is only needed in certain rare cases.
FuncaptchaApiJSSubdomain string `json:"funcaptchaApiJSSubdomain"`
//FunCaptcha website key.
//<div id="funcaptcha" data-pkey="THAT_ONE"></div>
WebsitePublicKey string `json:"websitePublicKey"`
//not required
//Additional parameter that may be required by FunCaptcha implementation.
//Use this property to send "blob" value as a stringified array. See example how it may look like.
//{"\blob\":\"HERE_COMES_THE_blob_VALUE\"}
Data string `json:"data"`
//Type of the proxy
//
//http - usual http/https proxy
//https - try this only if "http" doesn't work (required by some custom proxy servers)
//socks4 - socks4 proxy
//socks5 - socks5 proxy
ProxyType string `json:"proxyType"`
//Proxy IP address IPv4/IPv6. Not allowed to use:
//
//host names instead of IPs
//
//transparent proxies (where client IP is visible)
//
//proxies from local networks (192.., 10.., 127...)
ProxyAddress string `json:"proxyAddress"`
//Proxy port
ProxyPort string `json:"proxyPort"`
//not required
//Login for proxy which requires authorization (basic)
ProxyLogin string `json:"proxyLogin"`
//not required
//Proxy password
ProxyPassword string `json:"proxyPassword"`
//Browser's User-Agent which is used in emulation. It is required that you use a signature of a modern browser, otherwise Google will ask you to "update your browser".
UserAgent string `json:"userAgent"`
//not required
//Additional cookies which we must use during interaction with target page or Google.
//
//Format: cookiename1=cookievalue1; cookiename2=cookievalue2
Cookies string `json:"cookies"`
}
type FunCaptchaTaskProxyless struct {
//default value: FunCaptchaTaskProxyless
Type string `json:"type"`
//Address of a webpage with FunCaptcha
WebsiteURL string `json:"websiteURL"`
//not required
//A special subdomain of funcaptcha.com, from which the JS captcha widget should be loaded.
//Most FunCaptcha installations work from shared domains, so this option is only needed in certain rare cases.
FuncaptchaApiJSSubdomain string `json:"funcaptchaApiJSSubdomain"`
//FunCaptcha website key.
//<div id="funcaptcha" data-pkey="THAT_ONE"></div>
WebsitePublicKey string `json:"websitePublicKey"`
//not required
//Additional parameter that may be required by Funcaptcha implementation.
//Use this property to send "blob" value as a stringified array. See example how it may look like.
//{"\blob\":\"HERE_COMES_THE_blob_VALUE\"}
Data string `json:"data"`
}
type HCaptchaTask struct {
//default value: HCaptchaTask
Type string `json:"type"`
//Address of a webpage with hCaptcha
WebsiteURL string `json:"websiteURL"`
//hCaptcha website key.
WebsiteKey string `json:"websiteKey"`
//Type of the proxy
//
//http - usual http/https proxy
//https - try this only if "http" doesn't work (required by some custom proxy servers)
//socks4 - socks4 proxy
//socks5 - socks5 proxy
ProxyType string `json:"proxyType"`
//Proxy IP address IPv4/IPv6. Not allowed to use:
//
//host names instead of IPs
//
//transparent proxies (where client IP is visible)
//
//proxies from local networks (192.., 10.., 127...)
ProxyAddress string `json:"proxyAddress"`
//Proxy port
ProxyPort string `json:"proxyPort"`
//not required
//Login for proxy which requires authorization (basic)
ProxyLogin string `json:"proxyLogin"`
//not required
//Proxy password
ProxyPassword string `json:"proxyPassword"`
//not required
//Browser's User-Agent which is used in emulation. It is required that you use a signature of a modern browser.
UserAgent string `json:"userAgent"`
//not required
//Additional cookies which we must use during interaction with target page.
//
//Format: cookiename1=cookievalue1; cookiename2=cookievalue2
Cookies string `json:"cookies"`
}
type HCaptchaTaskProxyless struct {
//default value: HCaptchaTaskProxyless
Type string
//Address of a webpage with hCaptcha
WebsiteURL string
//hCaptcha website key.
WebsiteKey string
//not required
//Browser's User-Agent which is used in emulation. It is required that you use a signature of a modern browser.
UserAgent string
//not required
//Additional cookies which we must use during interaction with target page.
//
//Format: cookiename1=cookievalue1; cookiename2=cookievalue2
Cookies string
}