ad-m / python-anticaptcha

Client library for solve captchas with Anticaptcha.com support.
http://python-anticaptcha.readthedocs.io/en/latest/
MIT License
222 stars 51 forks source link

ERROR_KEY_DOES_NOT_EXIST #22

Closed kadnan closed 5 years ago

kadnan commented 5 years ago

Hi,

All of sudden I am getting this. Is this API Key error or something at Google end?

ad-m commented 5 years ago

Are you sure that you are using valid API-Key?

ERROR_KEY_DOES_NOT_EXIST mean:

Account authorization key not found in the system

kadnan commented 5 years ago

Yes it was working in August. Is it some renewal issue

ad-m commented 5 years ago

You review section of panel "API Settings" and "Security"? The key can be changed for various reasons, e.g. it has been published somewhere.

kadnan commented 5 years ago

you mean hacked?

I better let my employer to generate new one?

ad-m commented 5 years ago

I do not know, I'm guessing why the key has changed. If the old API key does not work, simply ask the employer for a new one.

kadnan commented 5 years ago

OK some how it seemed sorted out with new key generation but gets another error, a bit off topic though

[ERROR_CAPTCHA_UNSOLVABLE:12]Captcha could not be solved by 5 different workers

What should I do to sort it out?

ad-m commented 5 years ago

What type of captcha did you send?

kadnan commented 5 years ago
def get_token():
    client = AnticaptchaClient(api_key)
    task = NoCaptchaTaskProxylessTask(website_url=url,
                                      website_key=site_key)
    job = client.createTask(task)
    job.join()
    return job.get_solution_response()
kadnan commented 5 years ago

The URL in question is https://losangeles.craigslist.org/reply/lax/sub/6721286531

@ad-m

kadnan commented 5 years ago

The URL given above is generated when you access https://losangeles.craigslist.org/lac/sub/d/january-july-private-bedroom/6721286531.html and hit the REPLY button

@ad-m

kadnan commented 5 years ago

Can you guide?

ad-m commented 5 years ago

@kadnan , yes, of course. I will spend some time today to verify how I can help you & provide code.

I just came across an neews on the site Anti-captcha.com. Perhaps it is related? zaznaczenie_211

kadnan commented 5 years ago

@ad-m

Thanks brother for your help and guidance. Yes that could be the issue.

I also get OR_RECAPTCHA_TIMEOUT (usr12077403:972777@185.189.133.16:4040)

Also, whatever I have done so far, I am sharing gist with you:

https://gist.github.com/kadnan/7045e8344002e6b4c1f1783e8db531b4

Also, can you give me the URL where you find this message? What workaround is provided?

ad-m commented 5 years ago

@kadnan , that message is system news of Anti-captcha.com platform. It's available at https://anti-captcha.com/clients/help/news

It seems to me worth pointing out that I am not an operator of Anti-captcha.com. I am an independent library developer. However, I will do everything in my power to solve your problems because I have personal profits from your use of my library.

kadnan commented 5 years ago

@ad-m Brother thanks a lot and you deserve all kind of profits, however you gain.

ad-m commented 5 years ago

Average bid for recaptcha task on Anticaptcha.com s also shows some global issue: zaznaczenie_212 I created a script which shows that Anti-captcha.com todays doesn't works reliable:

$ python captcha.py 
563963662 => 03AMGVjXjDvj4lF4ht3VXbgKg9ClQ5XP592WuunowKNFS7m2HThClRlAv0ZkqjYIFrHuHa_FHu0zz4gnO1Z432srj2omVjyFWPApbTf9XuW2To_In2tUVFHGvQfp3NPJwREkJmfUzgt1SnkbDcMoRhFV8Ba9PlQOx53hdPO5yAkoMRMqLIiukdAcHAA3HEwBDTNIslSfGqrstcUwPrFJsBcBklLbVsMIb1ehM9SYobm1ZVm-PNNyUnpuazqqZIip2qn-noy8Ov9-PEmWzueH3Iv_iyEhemYZbOisqjn-WNITrY5E_vC6rFlkQ
563963677 => ERROR_CAPTCHA_UNSOLVABLE Captcha could not be solved by 5 different workers
563963708 => ERROR_CAPTCHA_UNSOLVABLE Captcha could not be solved by 5 different workers
563963731 => ERROR_RECAPTCHA_INVALID_SITEKEY Recaptcha server reported that site key is invalid
563963748 => ERROR_CAPTCHA_UNSOLVABLE Captcha could not be solved by 5 different workers
563967200 => ERROR_CAPTCHA_UNSOLVABLE Captcha could not be solved by 5 different workers
563967222 => ERROR_CAPTCHA_UNSOLVABLE Captcha could not be solved by 5 different workers
563967256 => ERROR_RECAPTCHA_INVALID_SITEKEY Recaptcha server reported that site key is invalid
563967292 => ERROR_CAPTCHA_UNSOLVABLE Captcha could not be solved by 5 different workers
563967305 => ERROR_CAPTCHA_UNSOLVABLE Captcha could not be solved by 5 different workers
563973689 => ERROR_CAPTCHA_UNSOLVABLE Captcha could not be solved by 5 different workers
563973704 => ERROR_CAPTCHA_UNSOLVABLE Captcha could not be solved by 5 different workers
563973724 => ERROR_CAPTCHA_UNSOLVABLE Captcha could not be solved by 5 different workers
563973732 => ERROR_RECAPTCHA_INVALID_SITEKEY Recaptcha server reported that site key is invalid
563973758 => 03AMGVjXjGEXT-YwcDkwb3MlLD7Wzkf7slqBXCHy9rwBlBgkU1daEZ324OkiJSayoRemqTT_hH-g3YpUjPSZEVQ29S9ngkmwFIgRpzBW52-2YA1rO8IeSrtCBQcSFUlIFr0F3GT8RPn0Sd18Xn_M2C64euANV4PtFVodw6Kfr6rPdgW3IzaaFghSUkprFXoDfTq3-USM6R_CR6_X4UBoGSxn_VjzAtHvtjZ7LedewIWkpMoiXeSRzwVenbXVUDLU8-qHk8Y_KKCpQDI98OEPXhqCg38kC15aUNM_3zDIKaGMjek-aE9Oige6U
563977695 => ERROR_CAPTCHA_UNSOLVABLE Captcha could not be solved by 5 different workers
563977717 => ERROR_CAPTCHA_UNSOLVABLE Captcha could not be solved by 5 different workers
563977748 => ERROR_CAPTCHA_UNSOLVABLE Captcha could not be solved by 5 different workers
563977780 => ERROR_RECAPTCHA_INVALID_SITEKEY Recaptcha server reported that site key is invalid
563977805 => 03AMGVjXiX_d0kKjmpttAK6-iTRI8XjmMzpYtj5xKwZoNB7ZPFaFA7CWylidTcnD6OgvIb58zXjsF-zWJnddYKU9L_RwnbCh2Ypjf2c5O-pKTVyR15vtyRNyJe7sriupmkftuxIOriKgwrU29HJM7QB_LH_24A_NgC_VYTjlZHOSIb4vfuQQ5Htl5XR7_A-VrxIVCRwutVEK_g-NOFmMI2A4FAk03NBmKPCm3RPYrtRwppT0i92R8VPOZzeAW3rH18AGkfL0eyCBdqh9uc37J6iWn0owBLGmzcm2UaB1TnPNl66hKXlGEGKMw
563983331 => ERROR_CAPTCHA_UNSOLVABLE Captcha could not be solved by 5 different workers
563983379 => ERROR_CAPTCHA_UNSOLVABLE Captcha could not be solved by 5 different workers
563983407 => ERROR_RECAPTCHA_INVALID_SITEKEY Recaptcha server reported that site key is invalid
563983427 => ERROR_RECAPTCHA_INVALID_SITEKEY Recaptcha server reported that site key is invalid
563983435 => ERROR_RECAPTCHA_INVALID_SITEKEY Recaptcha server reported that site key is invalid
563989256 => 03AMGVjXgQ3oKqhCouQ8a0VdDCGOgh4_X4DuMmkbl DNAnhyFU1ZeQqlnB5SLjf5F7E57uWUAkoPdJ6CXwOFh Nra21xzZOZjk71mGSNK7iCU9hzT4FOeV1JeIgPU8AXa XlRcnWpnPDcskAE6LDXq76AZNbi4FpMrQQYUI0xThzG swObI7Awxew-eZXpyBoS9749YxQp-r_oETmxsetMPdf2jqhl8E91pSecvlJGP2c3EkX5s5C8aLU ZSNiUuUU-zsxMyuixXV1agrX6

Here is source code:

import os
from python_anticaptcha import NoCaptchaTaskProxylessTask, AnticaptchaClient, \
    AnticaptchaException

api_key = os.environ['ANTICAPTCHA_TOKEN']
COUNT = 25
URL = 'https://losangeles.craigslist.org/lac/kid/d/housekeeper-sitting-pet-care/6720136191.html'
KEY = '6Lc-0DYUAAAAAOPM3RGobCfKjIE5STmzvZfHbbNx'
client = AnticaptchaClient(api_key)
tasks = [
    NoCaptchaTaskProxylessTask(
        website_url=URL,
        website_key=KEY,
    ) for _ in range(COUNT)
]
jobs = [client.createTask(task) for task in tasks]
for job in jobs:
    try:
        job.join()
        print(job.task_id, '=>', job.get_solution_response())
    except AnticaptchaException as e:
        print(job.task_id, '=>', e.error_code, e.error_description)

I suggest you wait for updates on Monday, or contact the platform operator directly. This problem seems to go beyond the library.

kadnan commented 5 years ago

Hmm..is this issue at the library end or Google? I mean I'd have a smilar issue with other anticaptcha services too?

ad-m commented 5 years ago

The process involves a library (I am responsible for it), the platform Anti-captcha.com and Google. In my opinion, the problem is currently on the Anti-captcha.com side. The problem is due to changes on the Google side. I think it's only a matter of time (up), until Anti-captcha.com restores operation.

kadnan commented 5 years ago

Is the message Captcha could not be solved by 5 different workers is the exact text returned by the service or what? Because they say they are responsible of errors generated by the service only.

@ad-m

ad-m commented 5 years ago

Captcha could not be solved by 5 different workers is response passed to our library by platform in errorDescription fields. The error response structure is following: zaznaczenie_220

I tested our library today using following code:

import os
from python_anticaptcha import NoCaptchaTaskProxylessTask, AnticaptchaClient, \
    AnticaptchaException

api_key = os.environ['ANTICAPTCHA_TOKEN']
COUNT = 10
URL = 'https://www.google.com/recaptcha/api2/demo?invisible=false'
KEY = '6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-'
client = AnticaptchaClient(api_key)
tasks = [
    NoCaptchaTaskProxylessTask(
        website_url=URL,
        website_key=KEY,
    ) for _ in range(COUNT)
]

jobs = []
for task in tasks:
    job = client.createTask(task)
    print(job.task_id, 'Started')
    jobs.append(job)

for job in jobs:
    try:
        job.join()
        print(job.task_id, '=>', job.get_solution_response())
    except AnticaptchaException as e:
        print(job.task_id, '=>', e.error_code, e.error_description)

I achieve following result:

$ python test.py 
585486852 Started
585486872 Started
585486886 Started
585486906 Started
585486917 Started
585486930 Started
585486952 Started
585486961 Started
585486978 Started
585486984 Started
585486852 => 03AMGVjXiac-oLQEb-FpUHVg-Pgm6suuOKt0y_YhbWzCNJQ5nfkjH4KL61RSyLmofWedbHeBDYQSsF5mTYLrEz5XYG-FAYrTmCVycbVphKubYF8SeekFF5NDYGRJo9ZyUrb_juK_mG1UQZ0HSyowU-OUBD7wLdYFGAmwrSwgbxcTssA5Yh0rBuLNumrEEn2c8dGPseuUXl9-_jzO_CC_u8oN9_A_VVs_DffYFtnpdyUEySWn6ujDQemXBN5qCPK_elhgk_e_rgNYt5kQee16CxQ9n0AWE6TcwghQ
585486872 => 03AMGVjXjHOMTiSMzwmWGeD-r9aB7uv9rwLeCeeMDwmqcC5AD7zOO_n_cZNzniQQ-Vk0aN8-VPBOJ1HnI-qsiQSa1BLGKmhPfKf3y6ylEssG0YQLD80RqSxSQ5WqSHlf7fwT1jThSFDa9mS2c2z4RBoKa_SUaHHJkLFzZbOIbggwJSfhm_e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5RWzNH4TJm5PEEOTamoINRlX0UDQhhcbyxlwej5A3eYSnI5ex1f27SuOPw
585486984 => 03AMGVjXgY_k2JRfr4JiOQbhzt7yPkwpohICSjjbJTkqeMp8BJ1xhCm_R6L8i1CrjsqjQ2YWONp4UDF6ZFxOgPUfQLD7u9C_XuHfKt8mJZoJ-ddtEpa6RxUysLbS6uKjFoDFFGqLX9wa-_e1Jd10Nudg48jT6o_59yEDWwYGHs1KV2dtrDokIfcyTqg-aemppHMx3N9Sll-HNVPQ7XvKZH1CAkr_jS5ChtL6uyNsZp3_XFdT8N-jwkx7kv4JWkkHIYLBeHIMC-srlYa_qQ2jfYI0Ze03eyspSVcg

Works perfect.

ad-m commented 5 years ago

@kadnan , it looks like the library is already working with Google's sample captcha, but it does not work with that particular page. I reported this to the platform operator to get clarifications.

ad-m commented 5 years ago

I received answers:

Hi, seems that invisible recaptcha domain detection algorithm stopped working, I'll fix that. Craglist is using invisible recaptcha and it should have been detected automatically.

Will inform you if I get additional information.

ad-m commented 5 years ago

@kadnan , I suggest make way to opt-out disable detection algorithm. I received answer that new parameter is added. I prepared new version of library to support that. To install use following:

$ pip install https://github.com/ad-m/python-anticaptcha/archive/add-is-invsibile.tar.gz

Then adjust your code to pass is_invisible=True to NoCaptchaProxyTask like example published at https://github.com/ad-m/python-anticaptcha/pull/23 .

kadnan commented 5 years ago

@ad-m Thanks for your reply. Are you saying to uninstall existing lib and install the one you mentioned above?

ad-m commented 5 years ago

@kadnan , it should automatically uninstall previous version, but you can do it manually too:

$ pip uninstall python-anticaptcha
$ pip install https://github.com/ad-m/python-anticaptcha/archive/add-is-invsibile.tar.gz

After your confirmation I will release new version with additional feature.

kadnan commented 5 years ago

@ad-m

I just checked, I did get the response 03AMGVjXhdc3bKcFAjP2hokgTGm-yU9mH1PvWswkZl9-Q5pwupP79KVv0fVGOhn7PXo4PD1lUtj6wYNHhrSjqV5uX-AhIgx3PKSf7UBPBlXPqDx3b5PCdKs13M1iD0y0pj_ZAci4lHXPCNv0hhAwQSrzRnpeP2cy3UJy5XFoQ6RNQfMj-ocYkVvPPYUnAI0GOy75slRm5KgCutUic4R8BrHV4TwoisdMt30t17R0zm9ntURVmARIiQRowI1It5T7eaFwS-OdEjoqGUp4LWR3nxhjBborCwrktPFA Which means it's working but somehow my actual problem still persis(which I guess not related to you) as despite of submitting captcha Craig slist returns same captcha form to me.

Any idea?

ad-m commented 5 years ago

Unfortunately, I have no idea how to bypass Craigslist security :(

ad-m commented 5 years ago

Closed as going beyond the scope of the library.