diff --git a/README.md b/README.md
index 658fe9c..27f830b 100644
--- a/README.md
+++ b/README.md
@@ -42,6 +42,10 @@ Examples of API requests for different captcha types are available on the [Pytho
- [Cutcaptcha](#cutcaptcha)
- [Tencent](#tencent)
- [DataDome](#datadome)
+ - [VKImage](#vkimage)
+ - [VKCaptcha](#vkcaptcha)
+ - [CaptchaFox](#captchafox)
+ - [Prosopo](#prosopo)
- [CyberSiARA](#cybersiara)
- [Other methods](#other-methods)
- [send / get\_result](#send--get_result)
@@ -440,6 +444,60 @@ result = solver.datadome(captcha_url="https://geo.captcha-delivery.com/captcha/?
param1=..., ...)
```
+### VKImage
+
+[API method description.](https://2captcha.com/2captcha-api#vkcaptcha)
+
+This method can be used to solve VK captcha using graphical captcha. Returns the number of steps and solution value in the target site's API format.
+
+```python
+result = solver.vkimage('path/to/captcha.jpg', steps='[5,4,7,7,14,22,8,...]', ...)
+```
+
+### VKCaptcha
+
+[API method description.](https://2captcha.com/2captcha-api#vkcaptcha)
+
+This method can be used to solve VK Captcha using a token. Returns a token.
+
+> [!IMPORTANT]
+> To solve the VK Captcha, you must use a proxy. It is recommended to use [residential proxies].
+
+```python
+result = solver.vkcaptcha(redirect_uri='https://id.vk.ru/...',
+ userAgent='Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36..',
+ proxy={
+ 'type': 'HTTP',
+ 'uri': 'login:password@IP_address:PORT'}
+ )
+```
+
+### CaptchaFox
+
+[API method description.](https://2captcha.com/2captcha-api#captchafox)
+
+This method can be used to solve CaptchaFox using a token. Returns a token.
+
+```python
+result = solver.captchafox(sitekey='sk_ILKWNruBBVKDOM7dZs59KHnDLEWiH',
+ pageurl='https://mysite.com/page/with/captchafox',
+ userAgent='Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36',
+ proxy={'type': 'HTTPS',
+ 'uri': 'login:password@IP_address:PORT'})
+```
+
+### Prosopo
+
+[API method description.](https://2captcha.com/2captcha-api#prosopo-procaptcha)
+
+This method can be used to solve Prosopo captcha using a token. Returns a token.
+
+```python
+result = solver.prosopo(sitekey='5EZVvsHMrKCFKp5NYNoTyDjTjetoVo1Z4UNNb1DkVLS0JbqR',
+ pageurl='https://mysite.com/page/with/prosopo'
+ )
+```
+
### CyberSiARA
[API method description.](https://2captcha.com/2captcha-api#cybersiara)
diff --git a/examples/async/async_amazon_waf.py b/examples/async/async_amazon_waf.py
index c80e33b..1d07d45 100644
--- a/examples/async/async_amazon_waf.py
+++ b/examples/async/async_amazon_waf.py
@@ -31,8 +31,7 @@ async def solve_captcha():
url='https://efw47fpad9.execute-api.us-east-1.amazonaws.com/latest',
)
except Exception as e:
- print(e)
- return e
+ sys.exit(e)
if __name__ == '__main__':
diff --git a/examples/async/async_amazon_waf_options.py b/examples/async/async_amazon_waf_options.py
index affff4e..78a76da 100644
--- a/examples/async/async_amazon_waf_options.py
+++ b/examples/async/async_amazon_waf_options.py
@@ -48,8 +48,7 @@ async def solve_amazon_waf():
# }
)
except Exception as e:
- print(e)
- raise e
+ sys.exit(e)
if __name__ == '__main__':
diff --git a/examples/async/async_atb_captcha.py b/examples/async/async_atb_captcha.py
index c4b4432..8b44854 100644
--- a/examples/async/async_atb_captcha.py
+++ b/examples/async/async_atb_captcha.py
@@ -25,8 +25,7 @@ async def solve_captcha():
url='http://mysite.com/',
)
except Exception as e:
- print(e)
- return e
+ sys.exit(e)
if __name__ == '__main__':
diff --git a/examples/async/async_atb_captcha_options.py b/examples/async/async_atb_captcha_options.py
index d9163cb..c210cef 100644
--- a/examples/async/async_atb_captcha_options.py
+++ b/examples/async/async_atb_captcha_options.py
@@ -39,8 +39,7 @@ async def solve_captcha():
# }
)
except Exception as e:
- print(e)
- return e
+ sys.exit(e)
if __name__ == '__main__':
diff --git a/examples/async/async_audio.py b/examples/async/async_audio.py
index 65b8395..d27fd0c 100644
--- a/examples/async/async_audio.py
+++ b/examples/async/async_audio.py
@@ -21,8 +21,7 @@ async def solve_captcha():
try:
return await solver.audio('../audio/example.mp3', lang='en')
except Exception as e:
- print(e)
- return e
+ sys.exit(e)
if __name__ == '__main__':
diff --git a/examples/async/async_canvas.py b/examples/async/async_canvas.py
index 3d62b01..ee7daa7 100644
--- a/examples/async/async_canvas.py
+++ b/examples/async/async_canvas.py
@@ -20,8 +20,7 @@ async def solve_captcha():
try:
return await solver.canvas('../images/canvas.jpg', hintText='Draw around apple')
except Exception as e:
- print(e)
- return e
+ sys.exit(e)
if __name__ == '__main__':
diff --git a/examples/async/async_canvas_base64.py b/examples/async/async_canvas_base64.py
index fc9f647..72e2d07 100644
--- a/examples/async/async_canvas_base64.py
+++ b/examples/async/async_canvas_base64.py
@@ -26,8 +26,7 @@ async def solve_captcha():
try:
return await solver.canvas(b64, hintText='Draw around apple')
except Exception as e:
- print(e)
- return e
+ sys.exit(e)
if __name__ == '__main__':
diff --git a/examples/async/async_canvas_options.py b/examples/async/async_canvas_options.py
index e0f329a..508b722 100644
--- a/examples/async/async_canvas_options.py
+++ b/examples/async/async_canvas_options.py
@@ -28,8 +28,7 @@ async def solve_captcha():
hintText='Draw around apple',
)
except Exception as e:
- print(e)
- return e
+ sys.exit(e)
if __name__ == '__main__':
diff --git a/examples/async/async_captchafox.py b/examples/async/async_captchafox.py
new file mode 100644
index 0000000..ccd6af5
--- /dev/null
+++ b/examples/async/async_captchafox.py
@@ -0,0 +1,33 @@
+import asyncio
+import sys
+import os
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(os.path.realpath(__file__)))))
+
+from twocaptcha import AsyncTwoCaptcha
+
+# in this example we store the API key inside environment variables that can be set like:
+# export APIKEY_2CAPTCHA=1abc234de56fab7c89012d34e56fa7b8 on Linux or macOS
+# set APIKEY_2CAPTCHA=1abc234de56fab7c89012d34e56fa7b8 on Windows
+# you can just set the API key directly to it's value like:
+# api_key="1abc234de56fab7c89012d34e56fa7b8"
+
+api_key = os.getenv('APIKEY_2CAPTCHA', 'YOUR_API_KEY')
+
+solver = AsyncTwoCaptcha(api_key)
+
+async def solve_captcha():
+ try:
+ return await solver.captchafox(
+ sitekey='sk_ILKWNruBBVKDOM7dZs59KHnDLEWiH',
+ pageurl='https://mysite.com/page/with/captchafox',
+ userAgent='Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36',
+ proxy={'type': 'HTTPS',
+ 'uri': 'login:password@IP_address:PORT'}
+ )
+ except Exception as e:
+ sys.exit(e)
+
+if __name__ == '__main__':
+ result = asyncio.run(solve_captcha())
+ sys.exit('result: ' + str(result))
\ No newline at end of file
diff --git a/examples/async/async_captchafox_options.py b/examples/async/async_captchafox_options.py
new file mode 100644
index 0000000..fd7ea79
--- /dev/null
+++ b/examples/async/async_captchafox_options.py
@@ -0,0 +1,42 @@
+import asyncio
+import sys
+import os
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(os.path.realpath(__file__)))))
+
+from twocaptcha import AsyncTwoCaptcha
+
+# in this example we store the API key inside environment variables that can be set like:
+# export APIKEY_2CAPTCHA=1abc234de56fab7c89012d34e56fa7b8 on Linux or macOS
+# set APIKEY_2CAPTCHA=1abc234de56fab7c89012d34e56fa7b8 on Windows
+# you can just set the API key directly to it's value like:
+# api_key="1abc234de56fab7c89012d34e56fa7b8"
+
+api_key = os.getenv('APIKEY_2CAPTCHA', 'YOUR_API_KEY')
+
+config = {
+ 'server': '2captcha.com', # can be also set to 'rucaptcha.com'
+ 'apiKey': api_key,
+ 'softId': 123,
+ 'defaultTimeout': 120,
+ 'recaptchaTimeout': 600,
+ 'pollingInterval': 10,
+ }
+
+solver = AsyncTwoCaptcha(**config)
+
+async def solve_captcha():
+ try:
+ return await solver.captchafox(
+ sitekey='sk_ILKWNruBBVKDOM7dZs59KHnDLEWiH',
+ pageurl='https://mysite.com/page/with/captchafox',
+ userAgent='Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36',
+ proxy={'type': 'HTTPS',
+ 'uri': 'login:password@IP_address:PORT'}
+ )
+ except Exception as e:
+ sys.exit(e)
+
+if __name__ == '__main__':
+ result = asyncio.run(solve_captcha())
+ sys.exit('result: ' + str(result))
\ No newline at end of file
diff --git a/examples/async/async_capy.py b/examples/async/async_capy.py
index 8232dc4..737928b 100644
--- a/examples/async/async_capy.py
+++ b/examples/async/async_capy.py
@@ -25,8 +25,7 @@ async def solve_captcha():
api_server="https://jp.api.capy.me/",
)
except Exception as e:
- print(e)
- return e
+ sys.exit(e)
if __name__ == '__main__':
diff --git a/examples/async/async_capy_options.py b/examples/async/async_capy_options.py
index 87d1cdc..422c37b 100644
--- a/examples/async/async_capy_options.py
+++ b/examples/async/async_capy_options.py
@@ -24,8 +24,7 @@ async def solve_captcha():
api_server="https://jp.api.capy.me/",
softId=33112)
except Exception as e:
- print(e)
- return e
+ sys.exit(e)
if __name__ == '__main__':
diff --git a/examples/async/async_coordinates.py b/examples/async/async_coordinates.py
index 0deb48f..a3ce91a 100644
--- a/examples/async/async_coordinates.py
+++ b/examples/async/async_coordinates.py
@@ -21,8 +21,7 @@ async def solve_captcha():
try:
return await solver.coordinates('../images/grid.jpg')
except Exception as e:
- print(e)
- return e
+ sys.exit(e)
if __name__ == '__main__':
diff --git a/examples/async/async_coordinates_base64.py b/examples/async/async_coordinates_base64.py
index 32c5be7..b04fb02 100644
--- a/examples/async/async_coordinates_base64.py
+++ b/examples/async/async_coordinates_base64.py
@@ -27,8 +27,7 @@ async def solve_captcha():
try:
return await solver.coordinates(b64)
except Exception as e:
- print(e)
- return e
+ sys.exit(e)
if __name__ == '__main__':
diff --git a/examples/async/async_coordinates_options.py b/examples/async/async_coordinates_options.py
index 06f8131..80f74c9 100644
--- a/examples/async/async_coordinates_options.py
+++ b/examples/async/async_coordinates_options.py
@@ -26,8 +26,7 @@ async def solve_captcha():
min_clicks=2,
max_clicks=3)
except Exception as e:
- print(e)
- return e
+ sys.exit(e)
if __name__ == '__main__':
diff --git a/examples/async/async_cutcaptcha.py b/examples/async/async_cutcaptcha.py
index 1b3351a..35a28cb 100644
--- a/examples/async/async_cutcaptcha.py
+++ b/examples/async/async_cutcaptcha.py
@@ -25,8 +25,7 @@ async def solve_captcha():
url='https://mysite.com/page/with/cutcaptcha',
)
except Exception as e:
- print(e)
- return e
+ sys.exit(e)
if __name__ == '__main__':
diff --git a/examples/async/async_cutcaptcha_options.py b/examples/async/async_cutcaptcha_options.py
index edfcd72..0a83a20 100644
--- a/examples/async/async_cutcaptcha_options.py
+++ b/examples/async/async_cutcaptcha_options.py
@@ -38,8 +38,7 @@ async def solve_captcha():
# }
)
except Exception as e:
- print(e)
- return e
+ sys.exit(e)
if __name__ == '__main__':
diff --git a/examples/async/async_cybersiara.py b/examples/async/async_cybersiara.py
index 93b4c7c..8a59669 100644
--- a/examples/async/async_cybersiara.py
+++ b/examples/async/async_cybersiara.py
@@ -25,8 +25,7 @@ async def solve_captcha():
userAgent='Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36',
)
except Exception as e:
- print(e)
- return e
+ sys.exit(e)
if __name__ == '__main__':
diff --git a/examples/async/async_datadome.py b/examples/async/async_datadome.py
index c1ff46f..9cc9af2 100644
--- a/examples/async/async_datadome.py
+++ b/examples/async/async_datadome.py
@@ -29,8 +29,7 @@ async def solve_captcha():
}
)
except Exception as e:
- print(e)
- return e
+ sys.exit(e)
if __name__ == '__main__':
diff --git a/examples/async/async_friendly_captcha.py b/examples/async/async_friendly_captcha.py
index 9987380..a80c619 100644
--- a/examples/async/async_friendly_captcha.py
+++ b/examples/async/async_friendly_captcha.py
@@ -24,8 +24,7 @@ async def solve_captcha():
url='https://friendlycaptcha.com/demo',
)
except Exception as e:
- print(e)
- return e
+ sys.exit(e)
if __name__ == '__main__':
diff --git a/examples/async/async_friendly_captcha_options.py b/examples/async/async_friendly_captcha_options.py
index 38e24d1..60c9cd6 100644
--- a/examples/async/async_friendly_captcha_options.py
+++ b/examples/async/async_friendly_captcha_options.py
@@ -38,8 +38,7 @@ async def solve_captcha():
# }
)
except Exception as e:
- print(e)
- return e
+ sys.exit(e)
if __name__ == '__main__':
diff --git a/examples/async/async_funcaptcha.py b/examples/async/async_funcaptcha.py
index 844999a..75a2ccf 100644
--- a/examples/async/async_funcaptcha.py
+++ b/examples/async/async_funcaptcha.py
@@ -25,8 +25,7 @@ async def solve_captcha():
surl='https://client-api.arkoselabs.com'
)
except Exception as e:
- print(e)
- return e
+ sys.exit(e)
if __name__ == '__main__':
diff --git a/examples/async/async_funcaptcha_options.py b/examples/async/async_funcaptcha_options.py
index 2af81a2..dcf9409 100644
--- a/examples/async/async_funcaptcha_options.py
+++ b/examples/async/async_funcaptcha_options.py
@@ -31,8 +31,7 @@ async def solve_captcha():
'uri': 'login:password@123.123.123.123:8080'
})
except Exception as e:
- print(e)
- return e
+ sys.exit(e)
if __name__ == '__main__':
diff --git a/examples/async/async_geetest.py b/examples/async/async_geetest.py
index dd7a214..c6f9265 100644
--- a/examples/async/async_geetest.py
+++ b/examples/async/async_geetest.py
@@ -36,8 +36,7 @@ async def solve_captcha():
url='https://2captcha.com/demo/geetest'
)
except Exception as e:
- print(e)
- return e
+ sys.exit(e)
if __name__ == '__main__':
diff --git a/examples/async/async_geetest_options.py b/examples/async/async_geetest_options.py
index ffb0d41..2bddae4 100644
--- a/examples/async/async_geetest_options.py
+++ b/examples/async/async_geetest_options.py
@@ -40,8 +40,7 @@ async def solve_captcha():
# }
)
except Exception as e:
- print(e)
- return e
+ sys.exit(e)
if __name__ == '__main__':
diff --git a/examples/async/async_geetest_v4.py b/examples/async/async_geetest_v4.py
index 6f5857f..956c14c 100644
--- a/examples/async/async_geetest_v4.py
+++ b/examples/async/async_geetest_v4.py
@@ -24,8 +24,7 @@ async def solve_captcha():
url='https://2captcha.com/demo/geetest-v4'
)
except Exception as e:
- print(e)
- return e
+ sys.exit(e)
if __name__ == '__main__':
diff --git a/examples/async/async_geetest_v4_options.py b/examples/async/async_geetest_v4_options.py
index 7a07b3c..6f9dc2b 100644
--- a/examples/async/async_geetest_v4_options.py
+++ b/examples/async/async_geetest_v4_options.py
@@ -38,8 +38,7 @@ async def solve_captcha():
# }
)
except Exception as e:
- print(e)
- return e
+ sys.exit(e)
if __name__ == '__main__':
diff --git a/examples/async/async_grid.py b/examples/async/async_grid.py
index e41a43f..6edbd4b 100644
--- a/examples/async/async_grid.py
+++ b/examples/async/async_grid.py
@@ -26,8 +26,7 @@ async def solve_captcha():
cols=3
)
except Exception as e:
- print(e)
- return e
+ sys.exit(e)
if __name__ == '__main__':
diff --git a/examples/async/async_grid_base64.py b/examples/async/async_grid_base64.py
index 76f7c47..452e609 100644
--- a/examples/async/async_grid_base64.py
+++ b/examples/async/async_grid_base64.py
@@ -33,8 +33,7 @@ async def solve_captcha():
cols=3
)
except Exception as e:
- print(e)
- return e
+ sys.exit(e)
if __name__ == '__main__':
diff --git a/examples/async/async_grid_options.py b/examples/async/async_grid_options.py
index 8f3cf74..5daec79 100644
--- a/examples/async/async_grid_options.py
+++ b/examples/async/async_grid_options.py
@@ -30,8 +30,7 @@ async def solve_captcha():
# hintText='Select all images with an Orange',
)
except Exception as e:
- print(e)
- return e
+ sys.exit(e)
if __name__ == '__main__':
diff --git a/examples/async/async_keycaptcha.py b/examples/async/async_keycaptcha.py
index 3854f75..11c72b9 100644
--- a/examples/async/async_keycaptcha.py
+++ b/examples/async/async_keycaptcha.py
@@ -27,8 +27,7 @@ async def solve_captcha():
url='https://2captcha.com/demo/keycaptcha'
)
except Exception as e:
- print(e)
- return e
+ sys.exit(e)
if __name__ == '__main__':
diff --git a/examples/async/async_keycaptcha_options.py b/examples/async/async_keycaptcha_options.py
index 746b749..cd6dc11 100644
--- a/examples/async/async_keycaptcha_options.py
+++ b/examples/async/async_keycaptcha_options.py
@@ -39,8 +39,7 @@ async def solve_captcha():
# 'uri': 'login:password@IP_address:PORT'}
)
except Exception as e:
- print(e)
- return e
+ sys.exit(e)
if __name__ == '__main__':
diff --git a/examples/async/async_lemin.py b/examples/async/async_lemin.py
index e119664..b39e3f8 100644
--- a/examples/async/async_lemin.py
+++ b/examples/async/async_lemin.py
@@ -25,8 +25,7 @@ async def solve_captcha():
url='https://2captcha.com/demo/lemin'
)
except Exception as e:
- print(e)
- return e
+ sys.exit(e)
if __name__ == '__main__':
diff --git a/examples/async/async_mtcaptcha.py b/examples/async/async_mtcaptcha.py
index a704ffe..2f0aeff 100644
--- a/examples/async/async_mtcaptcha.py
+++ b/examples/async/async_mtcaptcha.py
@@ -24,8 +24,7 @@ async def solve_captcha():
url='https://2captcha.com/demo/mtcaptcha',
)
except Exception as e:
- print(e)
- return e
+ sys.exit(e)
if __name__ == '__main__':
diff --git a/examples/async/async_mtcaptcha_options.py b/examples/async/async_mtcaptcha_options.py
index 83dc416..f2b6b77 100644
--- a/examples/async/async_mtcaptcha_options.py
+++ b/examples/async/async_mtcaptcha_options.py
@@ -38,8 +38,7 @@ async def solve_captcha():
# }
)
except Exception as e:
- print(e)
- return e
+ sys.exit(e)
if __name__ == '__main__':
diff --git a/examples/async/async_normal.py b/examples/async/async_normal.py
index 3089252..a5997d4 100644
--- a/examples/async/async_normal.py
+++ b/examples/async/async_normal.py
@@ -21,8 +21,7 @@ async def solve_captcha():
try:
return await solver.normal('../images/normal.jpg')
except Exception as e:
- print(e)
- return e
+ sys.exit(e)
if __name__ == '__main__':
diff --git a/examples/async/async_normal_base64.py b/examples/async/async_normal_base64.py
index 2a03e82..5305338 100644
--- a/examples/async/async_normal_base64.py
+++ b/examples/async/async_normal_base64.py
@@ -27,8 +27,7 @@ async def solve_captcha():
try:
return await solver.normal(b64)
except Exception as e:
- print(e)
- return e
+ sys.exit(e)
if __name__ == '__main__':
diff --git a/examples/async/async_normal_options.py b/examples/async/async_normal_options.py
index 89855ec..f6c5dd9 100644
--- a/examples/async/async_normal_options.py
+++ b/examples/async/async_normal_options.py
@@ -32,8 +32,7 @@ async def solve_captcha():
# hintText='Type red symbols only',
)
except Exception as e:
- print(e)
- return e
+ sys.exit(e)
if __name__ == '__main__':
diff --git a/examples/async/async_prosopo.py b/examples/async/async_prosopo.py
new file mode 100644
index 0000000..0dc1ed6
--- /dev/null
+++ b/examples/async/async_prosopo.py
@@ -0,0 +1,31 @@
+import asyncio
+import sys
+import os
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(os.path.realpath(__file__)))))
+
+from twocaptcha import AsyncTwoCaptcha
+
+# in this example we store the API key inside environment variables that can be set like:
+# export APIKEY_2CAPTCHA=1abc234de56fab7c89012d34e56fa7b8 on Linux or macOS
+# set APIKEY_2CAPTCHA=1abc234de56fab7c89012d34e56fa7b8 on Windows
+# you can just set the API key directly to it's value like:
+# api_key="1abc234de56fab7c89012d34e56fa7b8"
+
+api_key = os.getenv('APIKEY_2CAPTCHA', 'YOUR_API_KEY')
+
+solver = AsyncTwoCaptcha(api_key)
+
+async def solve_captcha():
+ try:
+ return await solver.prosopo(
+ sitekey='5EZVvsHMrKCFKp5NYNoTyDjTjetoVo1Z4UNNb1DkVLS0JbqR',
+ pageurl='https://mysite.com/page/with/prosopo',
+ )
+
+ except Exception as e:
+ sys.exit(e)
+
+if __name__ == '__main__':
+ result = asyncio.run(solve_captcha())
+ sys.exit('result: ' + str(result))
\ No newline at end of file
diff --git a/examples/async/async_prosopo_options.py b/examples/async/async_prosopo_options.py
new file mode 100644
index 0000000..bc677fd
--- /dev/null
+++ b/examples/async/async_prosopo_options.py
@@ -0,0 +1,39 @@
+import asyncio
+import sys
+import os
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(os.path.realpath(__file__)))))
+
+from twocaptcha import AsyncTwoCaptcha
+
+# in this example we store the API key inside environment variables that can be set like:
+# export APIKEY_2CAPTCHA=1abc234de56fab7c89012d34e56fa7b8 on Linux or macOS
+# set APIKEY_2CAPTCHA=1abc234de56fab7c89012d34e56fa7b8 on Windows
+# you can just set the API key directly to it's value like:
+# api_key="1abc234de56fab7c89012d34e56fa7b8"
+
+api_key = os.getenv('APIKEY_2CAPTCHA', 'YOUR_API_KEY')
+
+config = {
+ 'server': '2captcha.com', # can be also set to 'rucaptcha.com'
+ 'apiKey': api_key,
+ 'softId': 123,
+ 'defaultTimeout': 120,
+ 'recaptchaTimeout': 600,
+ 'pollingInterval': 10,
+ }
+
+solver = AsyncTwoCaptcha(**config)
+
+async def solve_captcha():
+ try:
+ return await solver.prosopo(
+ sitekey='5EZVvsHMrKCFKp5NYNoTyDjTjetoVo1Z4UNNb1DkVLS0JbqR',
+ pageurl='https://mysite.com/page/with/prosopo',
+ )
+ except Exception as e:
+ sys.exit(e)
+
+if __name__ == '__main__':
+ result = asyncio.run(solve_captcha())
+ sys.exit('result: ' + str(result))
\ No newline at end of file
diff --git a/examples/async/async_recaptcha_v2.py b/examples/async/async_recaptcha_v2.py
index 3da9566..28e3599 100644
--- a/examples/async/async_recaptcha_v2.py
+++ b/examples/async/async_recaptcha_v2.py
@@ -23,8 +23,7 @@ async def solve_captcha():
sitekey='6LdO5_IbAAAAAAeVBL9TClS19NUTt5wswEb3Q7C5',
url='https://2captcha.com/demo/recaptcha-v2-invisible')
except Exception as e:
- print(e)
- return e
+ sys.exit(e)
if __name__ == '__main__':
diff --git a/examples/async/async_recaptcha_v2_options.py b/examples/async/async_recaptcha_v2_options.py
index 88cfeaa..eb1bc56 100644
--- a/examples/async/async_recaptcha_v2_options.py
+++ b/examples/async/async_recaptcha_v2_options.py
@@ -40,8 +40,7 @@ async def solve_captcha():
# }
)
except Exception as e:
- print(e)
- return e
+ sys.exit(e)
if __name__ == '__main__':
diff --git a/examples/async/async_recaptcha_v3.py b/examples/async/async_recaptcha_v3.py
index 1705127..c0bb590 100644
--- a/examples/async/async_recaptcha_v3.py
+++ b/examples/async/async_recaptcha_v3.py
@@ -25,8 +25,7 @@ async def solve_captcha():
action='login',
version='v3')
except Exception as e:
- print(e)
- return e
+ sys.exit(e)
if __name__ == '__main__':
diff --git a/examples/async/async_recaptcha_v3_options.py b/examples/async/async_recaptcha_v3_options.py
index 0d5ba6b..2ddd70c 100644
--- a/examples/async/async_recaptcha_v3_options.py
+++ b/examples/async/async_recaptcha_v3_options.py
@@ -42,8 +42,7 @@ async def solve_captcha():
# }
)
except Exception as e:
- print(e)
- return e
+ sys.exit(e)
if __name__ == '__main__':
diff --git a/examples/async/async_rotate.py b/examples/async/async_rotate.py
index cf90851..ac3075b 100644
--- a/examples/async/async_rotate.py
+++ b/examples/async/async_rotate.py
@@ -21,8 +21,7 @@ async def solve_captcha():
try:
return await solver.rotate('../images/rotate.jpg')
except Exception as e:
- print(e)
- return e
+ sys.exit(e)
if __name__ == '__main__':
diff --git a/examples/async/async_rotate_options.py b/examples/async/async_rotate_options.py
index 930489c..37d9340 100644
--- a/examples/async/async_rotate_options.py
+++ b/examples/async/async_rotate_options.py
@@ -26,8 +26,7 @@ async def solve_captcha():
# hintImg = '../images/rotate_hint.jpg'
hintText='Put the images in the correct way up')
except Exception as e:
- print(e)
- return e
+ sys.exit(e)
if __name__ == '__main__':
diff --git a/examples/async/async_tencent.py b/examples/async/async_tencent.py
index 20e7b3c..980a127 100644
--- a/examples/async/async_tencent.py
+++ b/examples/async/async_tencent.py
@@ -24,8 +24,7 @@ async def solve_captcha():
url="https://mysite.com/page/with/tencent"
)
except Exception as e:
- print(e)
- return e
+ sys.exit(e)
if __name__ == '__main__':
diff --git a/examples/async/async_tencent_options.py b/examples/async/async_tencent_options.py
index 4c26b50..29c264f 100644
--- a/examples/async/async_tencent_options.py
+++ b/examples/async/async_tencent_options.py
@@ -38,8 +38,7 @@ async def solve_captcha():
# }
)
except Exception as e:
- print(e)
- return e
+ sys.exit(e)
if __name__ == '__main__':
diff --git a/examples/async/async_text.py b/examples/async/async_text.py
index c1fcdfb..dc17a1e 100644
--- a/examples/async/async_text.py
+++ b/examples/async/async_text.py
@@ -21,8 +21,7 @@ async def solve_captcha():
try:
return await solver.text('If tomorrow is Saturday, what day is today?')
except Exception as e:
- print(e)
- return e
+ sys.exit(e)
if __name__ == '__main__':
diff --git a/examples/async/async_text_options.py b/examples/async/async_text_options.py
index 2bf0e01..375166d 100644
--- a/examples/async/async_text_options.py
+++ b/examples/async/async_text_options.py
@@ -22,8 +22,7 @@ async def solve_captcha():
return await solver.text('If tomorrow is Saturday, what day is today?',
lang='en')
except Exception as e:
- print(e)
- return e
+ sys.exit(e)
if __name__ == '__main__':
diff --git a/examples/async/async_turnstile.py b/examples/async/async_turnstile.py
index f303d67..a5f2465 100644
--- a/examples/async/async_turnstile.py
+++ b/examples/async/async_turnstile.py
@@ -24,8 +24,7 @@ async def solve_captcha():
url='https://2captcha.com/demo/cloudflare-turnstile',
)
except Exception as e:
- print(e)
- return e
+ sys.exit(e)
if __name__ == '__main__':
diff --git a/examples/async/async_turnstile_options.py b/examples/async/async_turnstile_options.py
index 54fcc8b..59c4cfc 100644
--- a/examples/async/async_turnstile_options.py
+++ b/examples/async/async_turnstile_options.py
@@ -42,8 +42,7 @@ async def solve_captcha():
# }
)
except Exception as e:
- print(e)
- return e
+ sys.exit(e)
if __name__ == '__main__':
diff --git a/examples/async/async_vkcaptcha.py b/examples/async/async_vkcaptcha.py
new file mode 100644
index 0000000..135758c
--- /dev/null
+++ b/examples/async/async_vkcaptcha.py
@@ -0,0 +1,32 @@
+import asyncio
+import sys
+import os
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(os.path.realpath(__file__)))))
+
+from twocaptcha import AsyncTwoCaptcha
+
+# in this example we store the API key inside environment variables that can be set like:
+# export APIKEY_2CAPTCHA=1abc234de56fab7c89012d34e56fa7b8 on Linux or macOS
+# set APIKEY_2CAPTCHA=1abc234de56fab7c89012d34e56fa7b8 on Windows
+# you can just set the API key directly to it's value like:
+# api_key="1abc234de56fab7c89012d34e56fa7b8"
+
+api_key = os.getenv('APIKEY_2CAPTCHA', 'YOUR_API_KEY')
+
+solver = AsyncTwoCaptcha(api_key)
+
+async def solve_captcha():
+ try:
+ return await solver.vkcaptcha(
+ redirect_uri='https://id.vk.ru/not_robot_captcha?domain=vk.com&session_token=eyJhbGciOiJBMjU2R0NN....',
+ userAgent='Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.4348.100 Yandex/23.6.1.1107 Yowser/2.5 Safari/537.36',
+ proxy={'type': 'HTTPS',
+ 'uri': 'login:password@IP_address:PORT'}
+ )
+ except Exception as e:
+ sys.exit(e)
+
+if __name__ == '__main__':
+ result = asyncio.run(solve_captcha())
+ sys.exit('result: ' + str(result))
\ No newline at end of file
diff --git a/examples/async/async_vkcaptcha_options.py b/examples/async/async_vkcaptcha_options.py
new file mode 100644
index 0000000..8503510
--- /dev/null
+++ b/examples/async/async_vkcaptcha_options.py
@@ -0,0 +1,42 @@
+import asyncio
+import sys
+import os
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(os.path.realpath(__file__)))))
+
+from twocaptcha import AsyncTwoCaptcha
+
+# in this example we store the API key inside environment variables that can be set like:
+# export APIKEY_2CAPTCHA=1abc234de56fab7c89012d34e56fa7b8 on Linux or macOS
+# set APIKEY_2CAPTCHA=1abc234de56fab7c89012d34e56fa7b8 on Windows
+# you can just set the API key directly to it's value like:
+# api_key="1abc234de56fab7c89012d34e56fa7b8"
+
+api_key = os.getenv('APIKEY_2CAPTCHA', 'YOUR_API_KEY')
+
+config = {
+ 'server': '2captcha.com', # can be also set to 'rucaptcha.com'
+ 'apiKey': api_key,
+ 'softId': 123,
+ 'defaultTimeout': 120,
+ 'recaptchaTimeout': 600,
+ 'pollingInterval': 10,
+ 'extendedResponse':True
+ }
+
+solver = AsyncTwoCaptcha(**config)
+
+async def solve_captcha():
+ try:
+ return await solver.vkcaptcha(
+ redirect_uri='https://id.vk.ru/not_robot_captcha?domain=vk.com&session_token=eyJhbGciOiJBMjU2R0NN....',
+ userAgent='Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.4348.100 Yandex/23.6.1.1107 Yowser/2.5 Safari/537.36',
+ proxy={'type': 'HTTPS',
+ 'uri': 'login:password@IP_address:PORT'}
+ )
+ except Exception as e:
+ sys.exit(e)
+
+if __name__ == '__main__':
+ result = asyncio.run(solve_captcha())
+ sys.exit('result: ' + str(result))
\ No newline at end of file
diff --git a/examples/async/async_vkimage.py b/examples/async/async_vkimage.py
new file mode 100644
index 0000000..710c30a
--- /dev/null
+++ b/examples/async/async_vkimage.py
@@ -0,0 +1,32 @@
+import asyncio
+import sys
+import os
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(os.path.realpath(__file__)))))
+
+from twocaptcha import AsyncTwoCaptcha
+
+# in this example we store the API key inside environment variables that can be set like:
+# export APIKEY_2CAPTCHA=1abc234de56fab7c89012d34e56fa7b8 on Linux or macOS
+# set APIKEY_2CAPTCHA=1abc234de56fab7c89012d34e56fa7b8 on Windows
+# you can just set the API key directly to it's value like:
+# api_key="1abc234de56fab7c89012d34e56fa7b8"
+
+api_key = os.getenv('APIKEY_2CAPTCHA', 'YOUR_API_KEY')
+
+solver = AsyncTwoCaptcha(api_key)
+
+async def solve_captcha():
+ try:
+ return await solver.vkimage(
+ files='../images/vk.jpg',
+ steps='[5,4,7,7,14,22,8,3,2,7,23,22,2,8,24,5,9,20,2,5,0,6,22,4,5,11,12,12,9,6,18,3,21,18,17,'
+ '7,6,1,4,19,8,11,3,14,20,6,16,11,23,0,10,14,10,9,24,3,14,14,10,0,15,10,6,6,20,12,18,13,'
+ '20,7,13,9,22,14,24,14,17,22,0,4,6,11,10,15,18,20,0,3,6,4,23,12,15,14,18,4,2,9,5,2]',
+ )
+ except Exception as e:
+ sys.exit(e)
+
+if __name__ == '__main__':
+ result = asyncio.run(solve_captcha())
+ sys.exit('result: ' + str(result))
\ No newline at end of file
diff --git a/examples/async/async_vkimage_base64.py b/examples/async/async_vkimage_base64.py
new file mode 100644
index 0000000..710c30a
--- /dev/null
+++ b/examples/async/async_vkimage_base64.py
@@ -0,0 +1,32 @@
+import asyncio
+import sys
+import os
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(os.path.realpath(__file__)))))
+
+from twocaptcha import AsyncTwoCaptcha
+
+# in this example we store the API key inside environment variables that can be set like:
+# export APIKEY_2CAPTCHA=1abc234de56fab7c89012d34e56fa7b8 on Linux or macOS
+# set APIKEY_2CAPTCHA=1abc234de56fab7c89012d34e56fa7b8 on Windows
+# you can just set the API key directly to it's value like:
+# api_key="1abc234de56fab7c89012d34e56fa7b8"
+
+api_key = os.getenv('APIKEY_2CAPTCHA', 'YOUR_API_KEY')
+
+solver = AsyncTwoCaptcha(api_key)
+
+async def solve_captcha():
+ try:
+ return await solver.vkimage(
+ files='../images/vk.jpg',
+ steps='[5,4,7,7,14,22,8,3,2,7,23,22,2,8,24,5,9,20,2,5,0,6,22,4,5,11,12,12,9,6,18,3,21,18,17,'
+ '7,6,1,4,19,8,11,3,14,20,6,16,11,23,0,10,14,10,9,24,3,14,14,10,0,15,10,6,6,20,12,18,13,'
+ '20,7,13,9,22,14,24,14,17,22,0,4,6,11,10,15,18,20,0,3,6,4,23,12,15,14,18,4,2,9,5,2]',
+ )
+ except Exception as e:
+ sys.exit(e)
+
+if __name__ == '__main__':
+ result = asyncio.run(solve_captcha())
+ sys.exit('result: ' + str(result))
\ No newline at end of file
diff --git a/examples/async/async_vkimage_options.py b/examples/async/async_vkimage_options.py
new file mode 100644
index 0000000..dab7778
--- /dev/null
+++ b/examples/async/async_vkimage_options.py
@@ -0,0 +1,42 @@
+import asyncio
+import sys
+import os
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(os.path.realpath(__file__)))))
+
+from twocaptcha import AsyncTwoCaptcha
+
+# in this example we store the API key inside environment variables that can be set like:
+# export APIKEY_2CAPTCHA=1abc234de56fab7c89012d34e56fa7b8 on Linux or macOS
+# set APIKEY_2CAPTCHA=1abc234de56fab7c89012d34e56fa7b8 on Windows
+# you can just set the API key directly to it's value like:
+# api_key="1abc234de56fab7c89012d34e56fa7b8"
+
+api_key = os.getenv('APIKEY_2CAPTCHA', 'YOUR_API_KEY')
+
+config = {
+ 'server': '2captcha.com', # can be also set to 'rucaptcha.com'
+ 'apiKey': api_key,
+ 'softId': 123,
+ 'defaultTimeout': 120,
+ 'recaptchaTimeout': 600,
+ 'pollingInterval': 10,
+ 'extendedResponse': True
+ }
+
+solver = AsyncTwoCaptcha(**config)
+
+async def solve_captcha():
+ try:
+ return await solver.vkimage(
+ files='../images/vk.jpg',
+ steps='[5,4,7,7,14,22,8,3,2,7,23,22,2,8,24,5,9,20,2,5,0,6,22,4,5,11,12,12,9,6,18,3,21,18,17,'
+ '7,6,1,4,19,8,11,3,14,20,6,16,11,23,0,10,14,10,9,24,3,14,14,10,0,15,10,6,6,20,12,18,13,'
+ '20,7,13,9,22,14,24,14,17,22,0,4,6,11,10,15,18,20,0,3,6,4,23,12,15,14,18,4,2,9,5,2]',
+ )
+ except Exception as e:
+ sys.exit(e)
+
+if __name__ == '__main__':
+ result = asyncio.run(solve_captcha())
+ sys.exit('result: ' + str(result))
\ No newline at end of file
diff --git a/examples/async/async_yandex_smart.py b/examples/async/async_yandex_smart.py
index c3b2198..a8d574b 100644
--- a/examples/async/async_yandex_smart.py
+++ b/examples/async/async_yandex_smart.py
@@ -24,8 +24,7 @@ async def solve_captcha():
url="https://www.site.com/page/"
)
except Exception as e:
- print(e)
- return e
+ sys.exit(e)
if __name__ == '__main__':
diff --git a/examples/async/async_yandex_smart_options.py b/examples/async/async_yandex_smart_options.py
index 5305ada..4e12b69 100644
--- a/examples/async/async_yandex_smart_options.py
+++ b/examples/async/async_yandex_smart_options.py
@@ -38,8 +38,7 @@ async def solve_captcha():
# }
)
except Exception as e:
- print(e)
- return e
+ sys.exit(e)
if __name__ == '__main__':
diff --git a/examples/images/vk.jpg b/examples/images/vk.jpg
new file mode 100644
index 0000000..1d85198
Binary files /dev/null and b/examples/images/vk.jpg differ
diff --git a/examples/sync/captchafox.py b/examples/sync/captchafox.py
new file mode 100644
index 0000000..d50bbca
--- /dev/null
+++ b/examples/sync/captchafox.py
@@ -0,0 +1,31 @@
+import sys
+import os
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.realpath(__file__))))
+
+from twocaptcha import TwoCaptcha
+
+# in this example we store the API key inside environment variables that can be set like:
+# export APIKEY_2CAPTCHA=1abc234de56fab7c89012d34e56fa7b8 on Linux or macOS
+# set APIKEY_2CAPTCHA=1abc234de56fab7c89012d34e56fa7b8 on Windows
+# you can just set the API key directly to it's value like:
+# api_key="1abc234de56fab7c89012d34e56fa7b8"
+
+api_key = os.getenv('APIKEY_2CAPTCHA', 'YOUR_API_KEY')
+
+solver = TwoCaptcha(api_key)
+
+try:
+ result = solver.captchafox(
+ sitekey='sk_ILKWNruBBVKDOM7dZs59KHnDLEWiH',
+ pageurl='https://mysite.com/page/with/captchafox',
+ userAgent='Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36',
+ proxy={'type': 'HTTPS',
+ 'uri': 'login:password@IP_address:PORT'}
+ )
+
+except Exception as e:
+ sys.exit(e)
+
+else:
+ sys.exit('result: ' + str(result))
\ No newline at end of file
diff --git a/examples/sync/captchafox_options.py b/examples/sync/captchafox_options.py
new file mode 100644
index 0000000..e7339a1
--- /dev/null
+++ b/examples/sync/captchafox_options.py
@@ -0,0 +1,40 @@
+import sys
+import os
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.realpath(__file__))))
+
+from twocaptcha import TwoCaptcha
+
+# in this example we store the API key inside environment variables that can be set like:
+# export APIKEY_2CAPTCHA=1abc234de56fab7c89012d34e56fa7b8 on Linux or macOS
+# set APIKEY_2CAPTCHA=1abc234de56fab7c89012d34e56fa7b8 on Windows
+# you can just set the API key directly to it's value like:
+# api_key="1abc234de56fab7c89012d34e56fa7b8"
+
+api_key = os.getenv('APIKEY_2CAPTCHA', 'YOUR_API_KEY')
+
+config = {
+ 'server': '2captcha.com', # can be also set to 'rucaptcha.com'
+ 'apiKey': api_key,
+ 'softId': 123,
+ 'defaultTimeout': 120,
+ 'recaptchaTimeout': 600,
+ 'pollingInterval': 10,
+ }
+
+solver = TwoCaptcha(**config)
+
+try:
+ result = solver.captchafox(
+ sitekey='sk_ILKWNruBBVKDOM7dZs59KHnDLEWiH',
+ pageurl='https://mysite.com/page/with/captchafox',
+ userAgent='Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36',
+ proxy={'type': 'HTTPS',
+ 'uri': 'login:password@IP_address:PORT'}
+ )
+
+except Exception as e:
+ sys.exit(e)
+
+else:
+ sys.exit('result: ' + str(result))
\ No newline at end of file
diff --git a/examples/sync/prosopo.py b/examples/sync/prosopo.py
new file mode 100644
index 0000000..688134a
--- /dev/null
+++ b/examples/sync/prosopo.py
@@ -0,0 +1,28 @@
+import sys
+import os
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.realpath(__file__))))
+
+from twocaptcha import TwoCaptcha
+
+# in this example we store the API key inside environment variables that can be set like:
+# export APIKEY_2CAPTCHA=1abc234de56fab7c89012d34e56fa7b8 on Linux or macOS
+# set APIKEY_2CAPTCHA=1abc234de56fab7c89012d34e56fa7b8 on Windows
+# you can just set the API key directly to it's value like:
+# api_key="1abc234de56fab7c89012d34e56fa7b8"
+
+api_key = os.getenv('APIKEY_2CAPTCHA', 'YOUR_API_KEY')
+
+solver = TwoCaptcha(api_key)
+
+try:
+ result = solver.prosopo(
+ sitekey='5EZVvsHMrKCFKp5NYNoTyDjTjetoVo1Z4UNNb1DkVLS0JbqR',
+ pageurl='https://mysite.com/page/with/prosopo',
+ )
+
+except Exception as e:
+ sys.exit(e)
+
+else:
+ sys.exit('result: ' + str(result))
\ No newline at end of file
diff --git a/examples/sync/prosopo_options.py b/examples/sync/prosopo_options.py
new file mode 100644
index 0000000..402aa82
--- /dev/null
+++ b/examples/sync/prosopo_options.py
@@ -0,0 +1,41 @@
+import sys
+import os
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.realpath(__file__))))
+
+from twocaptcha import TwoCaptcha
+
+# in this example we store the API key inside environment variables that can be set like:
+# export APIKEY_2CAPTCHA=1abc234de56fab7c89012d34e56fa7b8 on Linux or macOS
+# set APIKEY_2CAPTCHA=1abc234de56fab7c89012d34e56fa7b8 on Windows
+# you can just set the API key directly to it's value like:
+# api_key="1abc234de56fab7c89012d34e56fa7b8"
+
+api_key = os.getenv('APIKEY_2CAPTCHA', 'YOUR_API_KEY')
+
+config = {
+ 'server': '2captcha.com', # can be also set to 'rucaptcha.com'
+ 'apiKey': api_key,
+ 'softId': 123,
+ 'defaultTimeout': 120,
+ 'recaptchaTimeout': 600,
+ 'pollingInterval': 10,
+ }
+
+solver = TwoCaptcha(**config)
+
+try:
+ result = solver.prosopo(
+ sitekey='5EZVvsHMrKCFKp5NYNoTyDjTjetoVo1Z4UNNb1DkVLS0JbqR',
+ pageurl='https://mysite.com/page/with/prosopo',
+ # proxy={
+ # 'type': 'HTTPS',
+ # 'uri': 'login:password@IP_address:PORT'
+ # }
+ )
+
+except Exception as e:
+ sys.exit(e)
+
+else:
+ sys.exit('result: ' + str(result))
\ No newline at end of file
diff --git a/examples/sync/vkcaptcha.py b/examples/sync/vkcaptcha.py
new file mode 100644
index 0000000..9607918
--- /dev/null
+++ b/examples/sync/vkcaptcha.py
@@ -0,0 +1,29 @@
+import sys
+import os
+sys.path.append(os.path.dirname(os.path.dirname(os.path.realpath(__file__))))
+
+from twocaptcha import TwoCaptcha
+
+# in this example we store the API key inside environment variables that can be set like:
+# export APIKEY_2CAPTCHA=1abc234de56fab7c89012d34e56fa7b8 on Linux or macOS
+# set APIKEY_2CAPTCHA=1abc234de56fab7c89012d34e56fa7b8 on Windows
+# you can just set the API key directly to it's value like:
+# api_key="1abc234de56fab7c89012d34e56fa7b8"
+
+api_key = os.getenv('APIKEY_2CAPTCHA', 'YOUR_API_KEY')
+
+solver = TwoCaptcha(api_key)
+
+try:
+ result = solver.vkcaptcha(redirect_uri='https://id.vk.ru/not_robot_captcha?domain=vk.com&session_token=eyJhbGciOiJBMjU2R0NN....',
+ userAgent='Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.4348.100 Yandex/23.6.1.1107 Yowser/2.5 Safari/537.36',
+ proxy={'type': 'HTTPS',
+ 'uri': 'login:password@IP_address:PORT'}
+ )
+
+
+except Exception as e:
+ sys.exit(e)
+
+else:
+ sys.exit('result: ' + str(result))
diff --git a/examples/sync/vkcaptcha_options.py b/examples/sync/vkcaptcha_options.py
new file mode 100644
index 0000000..f3cf8f3
--- /dev/null
+++ b/examples/sync/vkcaptcha_options.py
@@ -0,0 +1,39 @@
+import sys
+import os
+sys.path.append(os.path.dirname(os.path.dirname(os.path.realpath(__file__))))
+
+from twocaptcha import TwoCaptcha
+
+# in this example we store the API key inside environment variables that can be set like:
+# export APIKEY_2CAPTCHA=1abc234de56fab7c89012d34e56fa7b8 on Linux or macOS
+# set APIKEY_2CAPTCHA=1abc234de56fab7c89012d34e56fa7b8 on Windows
+# you can just set the API key directly to it's value like:
+# api_key="1abc234de56fab7c89012d34e56fa7b8"
+
+api_key = os.getenv('APIKEY_2CAPTCHA', 'YOUR_API_KEY')
+
+config = {
+ 'server': '2captcha.com', # can be also set to 'rucaptcha.com'
+ 'apiKey': api_key,
+ 'softId': 123,
+ 'defaultTimeout': 120,
+ 'recaptchaTimeout': 600,
+ 'pollingInterval': 10,
+ 'extendedResponse': True
+ }
+
+solver = TwoCaptcha(**config)
+
+try:
+ result = solver.vkcaptcha(redirect_uri='https://id.vk.ru/not_robot_captcha?domain=vk.com&session_token=eyJhbGciOiJBMjU2R0NN....',
+ userAgent='Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.4348.100 Yandex/23.6.1.1107 Yowser/2.5 Safari/537.36',
+ proxy={'type': 'HTTPS',
+ 'uri': 'login:password@IP_address:PORT'}
+ )
+
+
+except Exception as e:
+ sys.exit(e)
+
+else:
+ sys.exit('result: ' + str(result))
diff --git a/examples/sync/vkimage.py b/examples/sync/vkimage.py
new file mode 100644
index 0000000..62e29e6
--- /dev/null
+++ b/examples/sync/vkimage.py
@@ -0,0 +1,29 @@
+import sys
+import os
+import requests
+sys.path.append(os.path.dirname(os.path.dirname(os.path.realpath(__file__))))
+
+from twocaptcha import TwoCaptcha
+
+# in this example we store the API key inside environment variables that can be set like:
+# export APIKEY_2CAPTCHA=1abc234de56fab7c89012d34e56fa7b8 on Linux or macOS
+# set APIKEY_2CAPTCHA=1abc234de56fab7c89012d34e56fa7b8 on Windows
+# you can just set the API key directly to it's value like:
+# api_key="1abc234de56fab7c89012d34e56fa7b8"
+
+api_key = os.getenv('APIKEY_2CAPTCHA', 'YOUR_API_KEY')
+
+solver = TwoCaptcha(api_key)
+
+try:
+ result = solver.vkimage(files='./images/vk.jpg',
+ steps='[5,4,7,7,14,22,8,3,2,7,23,22,2,8,24,5,9,20,2,5,0,6,22,4,5,11,12,12,9,6,18,3,21,18,17,'
+ '7,6,1,4,19,8,11,3,14,20,6,16,11,23,0,10,14,10,9,24,3,14,14,10,0,15,10,6,6,20,12,18,13,'
+ '20,7,13,9,22,14,24,14,17,22,0,4,6,11,10,15,18,20,0,3,6,4,23,12,15,14,18,4,2,9,5,2]',
+ )
+
+except Exception as e:
+ sys.exit(e)
+
+else:
+ sys.exit('result: ' + str(result))
diff --git a/examples/sync/vkimage_base64.py b/examples/sync/vkimage_base64.py
new file mode 100644
index 0000000..5643302
--- /dev/null
+++ b/examples/sync/vkimage_base64.py
@@ -0,0 +1,33 @@
+import sys
+import os
+import requests
+from base64 import b64encode
+sys.path.append(os.path.dirname(os.path.dirname(os.path.realpath(__file__))))
+
+from twocaptcha import TwoCaptcha
+
+# in this example we store the API key inside environment variables that can be set like:
+# export APIKEY_2CAPTCHA=1abc234de56fab7c89012d34e56fa7b8 on Linux or macOS
+# set APIKEY_2CAPTCHA=1abc234de56fab7c89012d34e56fa7b8 on Windows
+# you can just set the API key directly to it's value like:
+# api_key="1abc234de56fab7c89012d34e56fa7b8"
+
+api_key = os.getenv('APIKEY_2CAPTCHA', 'YOUR_API_KEY')
+
+solver = TwoCaptcha(api_key)
+
+with open('../images/vk.jpg', 'rb') as f:
+ b64 = b64encode(f.read()).decode('utf-8')
+
+try:
+ result = solver.vkimage(files=b64,
+ steps='[5,4,7,7,14,22,8,3,2,7,23,22,2,8,24,5,9,20,2,5,0,6,22,4,5,11,12,12,9,6,18,3,21,18,17,'
+ '7,6,1,4,19,8,11,3,14,20,6,16,11,23,0,10,14,10,9,24,3,14,14,10,0,15,10,6,6,20,12,18,13,'
+ '20,7,13,9,22,14,24,14,17,22,0,4,6,11,10,15,18,20,0,3,6,4,23,12,15,14,18,4,2,9,5,2]',
+ )
+
+except Exception as e:
+ sys.exit(e)
+
+else:
+ sys.exit('result: ' + str(result))
diff --git a/examples/sync/vkimage_options.py b/examples/sync/vkimage_options.py
new file mode 100644
index 0000000..be35dda
--- /dev/null
+++ b/examples/sync/vkimage_options.py
@@ -0,0 +1,38 @@
+import sys
+import os
+import requests
+sys.path.append(os.path.dirname(os.path.dirname(os.path.realpath(__file__))))
+
+from twocaptcha import TwoCaptcha
+
+# in this example we store the API key inside environment variables that can be set like:
+# export APIKEY_2CAPTCHA=1abc234de56fab7c89012d34e56fa7b8 on Linux or macOS
+# set APIKEY_2CAPTCHA=1abc234de56fab7c89012d34e56fa7b8 on Windows
+# you can just set the API key directly to it's value like:
+# api_key="1abc234de56fab7c89012d34e56fa7b8"
+
+api_key = os.getenv('APIKEY_2CAPTCHA', 'YOUR_API_KEY')
+
+config = {
+ 'server': '2captcha.com', # can be also set to 'rucaptcha.com'
+ 'apiKey': api_key,
+ 'softId': 123,
+ 'defaultTimeout': 120,
+ 'recaptchaTimeout': 600,
+ 'pollingInterval': 10,
+ }
+
+solver = TwoCaptcha(**config)
+
+try:
+ result = solver.vkimage(files='./images/vk.jpg',
+ steps='[5,4,7,7,14,22,8,3,2,7,23,22,2,8,24,5,9,20,2,5,0,6,22,4,5,11,12,12,9,6,18,3,21,18,17,'
+ '7,6,1,4,19,8,11,3,14,20,6,16,11,23,0,10,14,10,9,24,3,14,14,10,0,15,10,6,6,20,12,18,13,'
+ '20,7,13,9,22,14,24,14,17,22,0,4,6,11,10,15,18,20,0,3,6,4,23,12,15,14,18,4,2,9,5,2]',
+ )
+
+except Exception as e:
+ sys.exit(e)
+
+else:
+ sys.exit('result: ' + str(result))
diff --git a/setup.py b/setup.py
index 7ba1dff..57912f8 100644
--- a/setup.py
+++ b/setup.py
@@ -36,6 +36,6 @@ def get_version():
'2captcha', 'captcha', 'api', 'captcha solver', 'reCAPTCHA',
'FunCaptcha', 'Geetest', 'image captcha', 'Coordinates', 'Click Captcha',
'Geetest V4', 'Lemin captcha', 'Amazon WAF', 'Cloudflare Turnstile',
- 'Capy Puzzle', 'MTCaptcha', 'Friendly Captcha', 'Tencent', 'Cutcaptcha', 'DataDome', 'cybersiara'],
- python_requires='>=3.6',
+ 'Capy Puzzle', 'MTCaptcha', 'Friendly Captcha', 'Tencent', 'Cutcaptcha', 'DataDome', 'VK Captcha', 'CaptchaFox', 'Prosopo', 'cybersiara'],
+ python_requires='>=3.8',
test_suite='tests')
diff --git a/tests/async/test_async_captchafox.py b/tests/async/test_async_captchafox.py
new file mode 100644
index 0000000..cb6a708
--- /dev/null
+++ b/tests/async/test_async_captchafox.py
@@ -0,0 +1,34 @@
+#!/usr/bin/env python3
+
+import unittest
+
+try:
+ from .abstract_async import AsyncAbstractTest
+except ImportError:
+ from abstract_async import AsyncAbstractTest
+
+
+class AsyncCaptchaFox(AsyncAbstractTest):
+ def test_all_params(self):
+ params = {
+ 'sitekey': 'sk_ILKWNruBBVKDOM7dZs50WPNUuCUKR',
+ 'pageurl': 'https://mysite.com/page/with/captchafox',
+ 'userAgent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36',
+ 'proxy': {'type': 'HTTPS',
+ 'uri': 'login:password@IP_address:PORT'}
+ }
+
+ sends = {
+ 'method' : 'captchafox',
+ 'sitekey': 'sk_ILKWNruBBVKDOM7dZs50WPNUuCUKR',
+ 'pageurl': 'https://mysite.com/page/with/captchafox',
+ 'useragent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36',
+ 'proxytype': 'HTTPS',
+ 'proxy': 'login:password@IP_address:PORT'
+ }
+
+ self.send_return(sends, self.solver.captchafox, **params)
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/tests/async/test_async_prosopo.py b/tests/async/test_async_prosopo.py
new file mode 100644
index 0000000..5d5aa2f
--- /dev/null
+++ b/tests/async/test_async_prosopo.py
@@ -0,0 +1,28 @@
+#!/usr/bin/env python3
+
+import unittest
+
+try:
+ from .abstract_async import AsyncAbstractTest
+except ImportError:
+ from abstract_async import AsyncAbstractTest
+
+
+class AsyncProsopo(AsyncAbstractTest):
+ def test_all_params(self):
+ params = {
+ 'sitekey': '5EZVvsHMrKCFKp5NYNoTyDjTjetoVo1Z4UNNbTwJf1GfN6Xm',
+ 'pageurl': 'https://www.twickets.live/',
+ }
+
+ sends = {
+ 'method' : 'prosopo',
+ 'sitekey': '5EZVvsHMrKCFKp5NYNoTyDjTjetoVo1Z4UNNbTwJf1GfN6Xm',
+ 'pageurl': 'https://www.twickets.live/',
+ }
+
+ self.send_return(sends, self.solver.prosopo, **params)
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/tests/async/test_async_vkcaptcha.py b/tests/async/test_async_vkcaptcha.py
new file mode 100644
index 0000000..24e48b2
--- /dev/null
+++ b/tests/async/test_async_vkcaptcha.py
@@ -0,0 +1,32 @@
+#!/usr/bin/env python3
+
+import unittest
+
+try:
+ from .abstract_async import AsyncAbstractTest
+except ImportError:
+ from abstract_async import AsyncAbstractTest
+
+
+class AsyncVkCaptcha(AsyncAbstractTest):
+ def test_all_params(self):
+ params = {
+ 'redirect_uri': 'https://id.vk.ru/not_robot_captcha?domain=vk.com&session_token=eyJhbGciOiJBMjU2R0NN...',
+ 'userAgent': 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.4348.100 Yandex/23.6.1.1107 Yowser/2.5 Safari/537.36',
+ 'proxy': {'type': 'HTTPS',
+ 'uri': 'login:password@IP_address:PORT'}
+ }
+
+ sends = {
+ 'method' : 'vkcaptcha',
+ 'redirect_uri': 'https://id.vk.ru/not_robot_captcha?domain=vk.com&session_token=eyJhbGciOiJBMjU2R0NN...',
+ 'useragent': 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.4348.100 Yandex/23.6.1.1107 Yowser/2.5 Safari/537.36',
+ 'proxytype': 'HTTPS',
+ 'proxy': 'login:password@IP_address:PORT'
+ }
+
+ self.send_return(sends, self.solver.vkcaptcha, **params)
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/tests/async/test_async_vkimage.py b/tests/async/test_async_vkimage.py
new file mode 100644
index 0000000..6315c06
--- /dev/null
+++ b/tests/async/test_async_vkimage.py
@@ -0,0 +1,54 @@
+#!/usr/bin/env python3
+
+import unittest
+from pathlib import Path
+from base64 import b64encode
+
+images_path = Path(__file__).resolve().parents[2] / 'examples' / 'images'
+files = [str(images_path / 'vk.jpg')]
+files_dict = {f'file_{i + 1}': path for i, path in enumerate(files)}
+
+STEPS = ('[5,4,7,7,14,22,8,3,2,7,23,22,2,8,24,5,9,20,2,5,0,6,22,4,5,11,12,12,9,6,18,3,21,18,17,7,6,'
+ '1,4,19,8,11,3,14,20,6,16,11,23,0,10,14,10,9,24,3,14,14,10,0,15,10,6,6,20,12,18,13,20,7,13,'
+ '9,22,14,24,14,17,22,0,4,6,11,10,15,18,20,0,3,6,4,23,12,15,14,18,4,2,9,5,2]')
+
+try:
+ from .abstract_async import AsyncAbstractTest
+except ImportError:
+ from abstract_async import AsyncAbstractTest
+
+
+class AsyncVkImage(AsyncAbstractTest):
+ def test_single_file(self):
+ sends = {'method': 'vkimage', 'file': files[0], 'steps': STEPS}
+ self.send_return(sends, self.solver.vkimage, files=files[0], steps=STEPS)
+
+ def test_files_list(self):
+ sends = {'method': 'vkimage', 'files': files_dict, 'steps': STEPS}
+ self.send_return(sends, self.solver.vkimage, files=files, steps=STEPS)
+
+ def test_files_dict(self):
+ sends = {'method': 'vkimage', 'files': files_dict, 'steps': STEPS}
+ self.send_return(sends, self.solver.vkimage, files=files_dict, steps=STEPS)
+
+ def test_all_params(self):
+ params = {'files': files[0], 'steps': STEPS}
+ sends = {'method': 'vkimage', 'file': files[0], 'steps': STEPS}
+ self.send_return(sends, self.solver.vkimage, **params)
+
+ def test_base64_body(self):
+ with open(files[0], 'rb') as fh:
+ body = b64encode(fh.read()).decode('utf-8')
+ params = {'files': body, 'steps': STEPS}
+ sends = {'method': 'vkimage', 'body': body, 'steps': STEPS}
+ self.send_return(sends, self.solver.vkimage, **params)
+
+ def test_not_found(self):
+ self.invalid_file(self.solver.vkimage, steps=STEPS)
+
+ def test_too_many(self):
+ self.too_many_files(self.solver.vkimage, steps=STEPS)
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/tests/sync/test_captchafox.py b/tests/sync/test_captchafox.py
new file mode 100755
index 0000000..06f8665
--- /dev/null
+++ b/tests/sync/test_captchafox.py
@@ -0,0 +1,44 @@
+#!/usr/bin/env python3
+
+import unittest
+
+try:
+ from .abstract import AbstractTest
+except ImportError:
+ from abstract import AbstractTest
+
+
+
+class CaptchaFox(AbstractTest):
+
+
+ def test_all_params(self):
+
+
+ params = {
+ 'sitekey': 'sk_ILKWNruBBVKDOM7dZs50WPNUuCUKR',
+ 'pageurl': 'https://mysite.com/page/with/captchafox',
+ 'userAgent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36',
+ 'proxy': {'type': 'HTTPS',
+ 'uri': 'login:password@IP_address:PORT'}
+ }
+
+ sends = {
+ 'method' : 'captchafox',
+ 'sitekey': 'sk_ILKWNruBBVKDOM7dZs50WPNUuCUKR',
+ 'pageurl': 'https://mysite.com/page/with/captchafox',
+ 'useragent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36',
+ 'proxytype': 'HTTPS',
+ 'proxy': 'login:password@IP_address:PORT'
+ }
+
+ return self.send_return(sends, self.solver.captchafox, **params)
+
+
+
+
+
+if __name__ == '__main__':
+
+ unittest.main()
+
diff --git a/tests/sync/test_prosopo.py b/tests/sync/test_prosopo.py
new file mode 100755
index 0000000..bf0ec83
--- /dev/null
+++ b/tests/sync/test_prosopo.py
@@ -0,0 +1,38 @@
+#!/usr/bin/env python3
+
+import unittest
+
+try:
+ from .abstract import AbstractTest
+except ImportError:
+ from abstract import AbstractTest
+
+
+
+class Prosopo(AbstractTest):
+
+
+ def test_all_params(self):
+
+
+ params = {
+ 'sitekey': '5EZVvsHMrKCFKp5NYNoTyDjTjetoVo1Z4UNNbTwJf1GfN6Xm',
+ 'pageurl': 'https://www.twickets.live/',
+ }
+
+ sends = {
+ 'method' : 'prosopo',
+ 'sitekey': '5EZVvsHMrKCFKp5NYNoTyDjTjetoVo1Z4UNNbTwJf1GfN6Xm',
+ 'pageurl': 'https://www.twickets.live/',
+ }
+
+ return self.send_return(sends, self.solver.prosopo, **params)
+
+
+
+
+
+if __name__ == '__main__':
+
+ unittest.main()
+
diff --git a/tests/sync/test_vkcaptcha.py b/tests/sync/test_vkcaptcha.py
new file mode 100755
index 0000000..74a8358
--- /dev/null
+++ b/tests/sync/test_vkcaptcha.py
@@ -0,0 +1,42 @@
+#!/usr/bin/env python3
+
+import unittest
+
+try:
+ from .abstract import AbstractTest
+except ImportError:
+ from abstract import AbstractTest
+
+
+
+class VkCaptcha(AbstractTest):
+
+
+ def test_all_params(self):
+
+
+ params = {
+ 'redirect_uri': 'https://id.vk.ru/not_robot_captcha?domain=vk.com&session_token=eyJhbGciOiJBMjU2R0NN...',
+ 'userAgent': 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.4348.100 Yandex/23.6.1.1107 Yowser/2.5 Safari/537.36',
+ 'proxy': {'type': 'HTTPS',
+ 'uri': 'login:password@IP_address:PORT'}
+ }
+
+ sends = {
+ 'method' : 'vkcaptcha',
+ 'redirect_uri': 'https://id.vk.ru/not_robot_captcha?domain=vk.com&session_token=eyJhbGciOiJBMjU2R0NN...',
+ 'useragent': 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.4348.100 Yandex/23.6.1.1107 Yowser/2.5 Safari/537.36',
+ 'proxytype': 'HTTPS',
+ 'proxy': 'login:password@IP_address:PORT'
+ }
+
+ return self.send_return(sends, self.solver.vkcaptcha, **params)
+
+
+
+
+
+if __name__ == '__main__':
+
+ unittest.main()
+
diff --git a/tests/sync/test_vkimage.py b/tests/sync/test_vkimage.py
new file mode 100755
index 0000000..9e95040
--- /dev/null
+++ b/tests/sync/test_vkimage.py
@@ -0,0 +1,55 @@
+#!/usr/bin/env python3
+
+import unittest
+from pathlib import Path
+from base64 import b64encode
+
+images_path = Path(__file__).resolve().parents[2] / 'examples' / 'images'
+files = [str(images_path / 'vk.jpg')]
+files_dict = {f'file_{i + 1}': path for i, path in enumerate(files)}
+
+STEPS = ('[5,4,7,7,14,22,8,3,2,7,23,22,2,8,24,5,9,20,2,5,0,6,22,4,5,11,12,12,9,6,18,3,21,18,17,7,6,'
+ '1,4,19,8,11,3,14,20,6,16,11,23,0,10,14,10,9,24,3,14,14,10,0,15,10,6,6,20,12,18,13,20,7,13,'
+ '9,22,14,24,14,17,22,0,4,6,11,10,15,18,20,0,3,6,4,23,12,15,14,18,4,2,9,5,2]')
+
+try:
+ from .abstract import AbstractTest
+except ImportError:
+ from abstract import AbstractTest
+
+
+class VkImage(AbstractTest):
+
+ def test_single_file(self):
+ sends = {'method': 'vkimage', 'file': files[0], 'steps': STEPS}
+ return self.send_return(sends, self.solver.vkimage, files=files[0], steps=STEPS)
+
+ def test_files_list(self):
+ sends = {'method': 'vkimage', 'files': files_dict, 'steps': STEPS}
+ return self.send_return(sends, self.solver.vkimage, files=files, steps=STEPS)
+
+ def test_files_dict(self):
+ sends = {'method': 'vkimage', 'files': files_dict, 'steps': STEPS}
+ return self.send_return(sends, self.solver.vkimage, files=files_dict, steps=STEPS)
+
+ def test_all_params(self):
+ params = {'files': files[0], 'steps': STEPS}
+ sends = {'method': 'vkimage', 'file': files[0], 'steps': STEPS}
+ return self.send_return(sends, self.solver.vkimage, **params)
+
+ def test_base64_body(self):
+ with open(files[0], 'rb') as fh:
+ body = b64encode(fh.read()).decode('utf-8')
+ params = {'files': body, 'steps': STEPS}
+ sends = {'method': 'vkimage', 'body': body, 'steps': STEPS}
+ return self.send_return(sends, self.solver.vkimage, **params)
+
+ def test_not_found(self):
+ return self.invalid_file(self.solver.vkimage, steps=STEPS)
+
+ def test_too_many(self):
+ return self.too_many_files(self.solver.vkimage, steps=STEPS)
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/twocaptcha/async_solver.py b/twocaptcha/async_solver.py
index d063fcc..1806f6e 100644
--- a/twocaptcha/async_solver.py
+++ b/twocaptcha/async_solver.py
@@ -800,6 +800,103 @@ async def cutcaptcha(self, misery_key, apikey, url, **kwargs):
**kwargs)
return result
+ async def vkimage(self, files, steps, **kwargs):
+ '''Wrapper for solving vkimage captcha.
+
+ Parameters
+ __________
+ file : str
+ Captcha image as a file or base64.
+ steps: str
+ Array of steps.
+ proxy : dict, optional
+ {'type': 'HTTPS', 'uri': 'login:password@IP_address:PORT'}.
+ '''
+
+ if isinstance(files, str):
+
+ payload = await self.get_method(files)
+ payload.pop('method', None)
+
+ result = await self.solve(method='vkimage', steps=steps, **payload, **kwargs)
+ return result
+
+ elif isinstance(files, dict):
+ files = list(files.values())
+
+ files = self.extract_files(files)
+
+ result = await self.solve(method='vkimage',
+ files=files,
+ steps=steps,
+ **kwargs)
+ return result
+
+ async def vkcaptcha(self, redirect_uri, userAgent, proxy, **kwargs):
+ '''Wrapper for solving VK captcha using tokens.
+
+ Parameters
+ __________
+ redirect_uri : str
+ The URL that is returned for requests to the captchas API.
+ userAgent : str
+ User-Agent of the browser that will be used by the employee when loading the captcha.
+ proxy : dict
+ {'type': 'HTTPS', 'uri': 'login:password@IP_address:PORT'}.
+ '''
+
+
+ result = await self.solve(method='vkcaptcha',
+ redirect_uri=redirect_uri,
+ useragent=userAgent,
+ proxy=proxy,
+ **kwargs)
+ return result
+
+ async def captchafox(self, sitekey, pageurl, userAgent, proxy, **kwargs):
+ '''Wrapper for solving CaptchaFox using tokens.
+
+ Parameters
+ __________
+ sitekey : str
+ The sitekey parameter value found on the page or in network requests.
+ pageurl : str
+ Full URL of the page with captcha.
+ userAgent : str
+ User-Agent of the browser that will be used by the employee when loading the captcha.
+ proxy : dict
+ {'type': 'HTTPS', 'uri': 'login:password@IP_address:PORT'}.
+ '''
+
+
+ result = await self.solve(method='captchafox',
+ sitekey=sitekey,
+ pageurl=pageurl,
+ useragent=userAgent,
+ proxy=proxy,
+ **kwargs)
+ return result
+
+ async def prosopo(self, sitekey, pageurl, **kwargs):
+ '''Wrapper for solving Prosopo captcha using tokens.
+
+ Parameters
+ __________
+ sitekey : str
+ The sitekey parameter value found on the page or in network requests.
+ pageurl : str
+ Full URL of the page with captcha.
+ proxy : dict, optional
+ {'type': 'HTTPS', 'uri': 'login:password@IP_address:PORT'}.
+ '''
+
+
+ result = await self.solve(method='prosopo',
+ sitekey=sitekey,
+ pageurl=pageurl,
+ **kwargs)
+ return result
+
async def datadome(self, captcha_url, pageurl, userAgent, proxy, **kwargs):
"""Wrapper for solving DataDome Captcha.
diff --git a/twocaptcha/solver.py b/twocaptcha/solver.py
index f8e3a8e..d186f9d 100755
--- a/twocaptcha/solver.py
+++ b/twocaptcha/solver.py
@@ -930,6 +930,103 @@ def cutcaptcha(self, misery_key, apikey, url, **kwargs):
**kwargs)
return result
+ def vkimage(self, files, steps, **kwargs):
+ '''Wrapper for solving vkimage captcha.
+
+ Parameters
+ __________
+ file : str
+ Captcha image as a file or base64.
+ steps: str
+ Array of steps.
+ proxy : dict, optional
+ {'type': 'HTTPS', 'uri': 'login:password@IP_address:PORT'}.
+ '''
+
+ if isinstance(files, str):
+
+ payload = self.get_method(files)
+ payload.pop('method', None)
+
+ result = self.solve(method='vkimage', steps=steps, **payload, **kwargs)
+ return result
+
+ elif isinstance(files, dict):
+ files = list(files.values())
+
+ files = self.extract_files(files)
+
+ result = self.solve(method='vkimage',
+ files=files,
+ steps=steps,
+ **kwargs)
+ return result
+
+ def vkcaptcha(self, redirect_uri, userAgent, proxy, **kwargs):
+ '''Wrapper for solving VK captcha using tokens.
+
+ Parameters
+ __________
+ redirect_uri : str
+ The URL that is returned for requests to the captchas API.
+ userAgent : str
+ User-Agent of the browser that will be used by the employee when loading the captcha.
+ proxy : dict
+ {'type': 'HTTPS', 'uri': 'login:password@IP_address:PORT'}.
+ '''
+
+
+ result = self.solve(method='vkcaptcha',
+ redirect_uri=redirect_uri,
+ useragent=userAgent,
+ proxy=proxy,
+ **kwargs)
+ return result
+
+ def captchafox(self, sitekey, pageurl, userAgent, proxy, **kwargs):
+ '''Wrapper for solving CaptchaFox using tokens.
+
+ Parameters
+ __________
+ sitekey : str
+ The sitekey parameter value found on the page or in network requests.
+ pageurl : str
+ Full URL of the page with captcha.
+ userAgent : str
+ User-Agent of the browser that will be used by the employee when loading the captcha.
+ proxy : dict
+ {'type': 'HTTPS', 'uri': 'login:password@IP_address:PORT'}.
+ '''
+
+
+ result = self.solve(method='captchafox',
+ sitekey=sitekey,
+ pageurl=pageurl,
+ useragent=userAgent,
+ proxy=proxy,
+ **kwargs)
+ return result
+
+ def prosopo(self, sitekey, pageurl, **kwargs):
+ '''Wrapper for solving Prosopo captcha using tokens.
+
+ Parameters
+ __________
+ sitekey : str
+ The sitekey parameter value found on the page or in network requests.
+ pageurl : str
+ Full URL of the page with captcha.
+ proxy : dict, optional
+ {'type': 'HTTPS', 'uri': 'login:password@IP_address:PORT'}.
+ '''
+
+
+ result = self.solve(method='prosopo',
+ sitekey=sitekey,
+ pageurl=pageurl,
+ **kwargs)
+ return result
+
def datadome(self, captcha_url, pageurl, userAgent, proxy, **kwargs):
"""Wrapper for solving DataDome Captcha.