Пример #1
0
def generate_captcha(request_header, captcha_automation, api_key):
    logger.debug(
        "================================= GETTING CAPTCHA =================================================="
    )
    resp = requests.post(CAPTCHA_URL, headers=request_header)
    logger.debug(f'Captcha Response Code: {resp.status_code}')

    return captcha_builder_auto(resp.json(), api_key, logger)
Пример #2
0
def generate_captcha(request_header, captcha_automation):
    print(
        "================================= GETTING CAPTCHA =================================================="
    )
    resp = requests.post(CAPTCHA_URL, headers=request_header)
    print(f"Captcha Response Code: {resp.status_code}")

    if resp.status_code == 200 and captcha_automation == "n":
        return captcha_builder_manual(resp.json())
    elif resp.status_code == 200 and captcha_automation == "y":
        return captcha_builder_auto(resp.json())
Пример #3
0
def generate_captcha(request_header, captcha_automation, api_key):
    print(
        "================================= GETTING CAPTCHA =================================================="
    )
    resp = requests.post(CAPTCHA_URL, headers=request_header)
    print(f'Captcha Response Code: {resp.status_code}')

    if resp.status_code == 200 and captcha_automation == "no":
        return captcha_builder(resp.json())
    elif resp.status_code == 200 and captcha_automation == "yes":
        return captcha_builder_auto(resp.json(), api_key)