FunCaptcha

To import this module:

from python_rucaptcha.fun_captcha import FunCaptcha
class python_rucaptcha.fun_captcha.FunCaptcha(websiteURL: str, websitePublicKey: str, method: str | FunCaptchaEnm = FunCaptchaEnm.FunCaptchaTaskProxyless, *args, **kwargs)
__init__(websiteURL: str, websitePublicKey: str, method: str | FunCaptchaEnm = FunCaptchaEnm.FunCaptchaTaskProxyless, *args, **kwargs)

The class is used to work with Arkose Labs FunCaptcha.

Parameters:
  • rucaptcha_key – User API key

  • websiteURL (str) – Full URL of the captcha page

  • websitePublicKey (str) – The value of the pk or data-pkey parameter you found in the page code

  • method (str | FunCaptchaEnm) – Captcha type

Examples

>>> FunCaptcha(rucaptcha_key="aa9011f31111181111168611f1151122",
...             websiteURL="https://api.funcaptcha.com/tile-game-lite-mode/fc/api/nojs/?pkey=69A21A01-CC7B-B9C6-0F9A-E7FA06677FFC&lang=en",
...             websitePublicKey="69A21A01-CC7B-B9C6-0F9A-E7FA06677FFC",
...             method=FunCaptchaEnm.FunCaptchaTaskProxyless.value
...             ).captcha_handler()
{
   "errorId":0,
   "status":"ready",
   "solution":{
      "token":"142000f.....er"
   },
   "cost":"0.002",
   "ip":"1.2.3.4",
   "createTime":1692863536,
   "endTime":1692863556,
   "solveCount":0,
   "taskId": 73243152973,
}
>>> await FunCaptcha(rucaptcha_key="aa9011f31111181111168611f1151122",
...             websiteURL="https://api.funcaptcha.com/tile-game-lite-mode/fc/api/nojs/?pkey=69A21A01-CC7B-B9C6-0F9A-E7FA06677FFC&lang=en",
...             websitePublicKey="69A21A01-CC7B-B9C6-0F9A-E7FA06677FFC",
...             method=FunCaptchaEnm.FunCaptchaTaskProxyless.value
...             ).aio_captcha_handler()
{
   "errorId":0,
   "status":"ready",
   "solution":{
      "token":"142000f.....er"
   },
   "cost":"0.002",
   "ip":"1.2.3.4",
   "createTime":1692863536,
   "endTime":1692863556,
   "solveCount":0,
   "taskId": 73243152973,
}
Returns:

Dict with full server response

captcha_handler(**kwargs) dict

Sync solving method

Parameters:

kwargs – additional params for requests library

Returns:

Dict with full server response

Return type:

dict

Notes

Check class docstirng for more info

async aio_captcha_handler() dict

Async solving method

Returns:

Dict with full server response

Return type:

dict

Notes

Check class docstirng for more info