2019-09-11 01:09:38 +00:00
|
|
|
import asyncio
|
|
|
|
|
|
|
|
from python3_anticaptcha import CustomResultHandler
|
|
|
|
|
|
|
|
|
|
|
|
ANTICAPTCHA_KEY = ""
|
|
|
|
"""
|
|
|
|
This module is used to obtain the result of solving the task in "manual" mode
|
|
|
|
"""
|
|
|
|
TASK_ID = 123456
|
|
|
|
|
|
|
|
# prepare client
|
2019-09-11 01:09:56 +00:00
|
|
|
custom_result = CustomResultHandler.CustomResultHandler(anticaptcha_key=ANTICAPTCHA_KEY)
|
2019-09-11 01:09:38 +00:00
|
|
|
|
|
|
|
response = custom_result.task_handler(task_id=TASK_ID)
|
|
|
|
print(response)
|
|
|
|
|
|
|
|
|
|
|
|
# async example
|
|
|
|
async def run():
|
|
|
|
try:
|
|
|
|
# io.IOBase
|
2019-11-25 17:08:18 +00:00
|
|
|
custom_result = CustomResultHandler.aioCustomResultHandler(anticaptcha_key=ANTICAPTCHA_KEY)
|
2019-09-11 01:09:38 +00:00
|
|
|
response = await custom_result.task_handler(task_id=TASK_ID)
|
|
|
|
print(response)
|
|
|
|
except Exception as err:
|
|
|
|
print(err)
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
loop = asyncio.get_event_loop()
|
|
|
|
loop.run_until_complete(run())
|
2019-09-11 01:09:56 +00:00
|
|
|
loop.close()
|