API Eğitimleri

Özel CAPTCHA Türleri: CaptchaAI'ye Olağandışı Mücadeleler Gönderme

Tüm CAPTCHA'lar reCAPTCHA veya standart metin görselleri değildir. Özel CAPTCHA'lar parametre çıkarma ve gönderme konusunda yaratıcı yaklaşımlar gerektirir.


Özel CAPTCHA'ları Tanımlama

Tür Özellikler Yaklaşım
Kaydırıcı CAPTCHA Konuma sürükleyin Resim olarak ekran görüntüsü, metin talimatlarını kullanın
Bulmaca (yapboz) Sığdırmak için parçayı sürükleyin GeeTest tarzı çözümle eşleşebilir
Ses CAPTCHA'sı Dinleyin ve yazın Ses dosyasını gönder
Resmi döndür Yönü düzeltmek için döndürün Ekran görüntüsü + talimatlar
Sipariş seçin Öğeleri sırayla tıklayın Görüntü ızgarası yaklaşımını kullanın
Matematik denklemi Aritmetik çöz calc=1 parametresini kullanın
Özel etkileşimli Siteye özel JS widget'ı Ekran görüntüsü + metin talimatları

Özel Görsellerin Talimatlarla Gönderilmesi

Herhangi bir görsel CAPTCHA için ekran görüntüsünü alın ve talimatları sağlayın:

import requests
import base64
import time
import os

API_KEY = os.environ["CAPTCHAAI_API_KEY"]


def solve_custom_captcha(image_b64, instructions):
    """Solve any visual CAPTCHA using image + text instructions."""
    resp = requests.post("https://ocr.captchaai.com/in.php", data={
        "key": API_KEY,
        "method": "base64",
        "body": image_b64,
        "textinstructions": instructions,
        "json": 1,
    }, timeout=30)

    result = resp.json()
    if result.get("status") != 1:
        raise RuntimeError(result.get("request"))

    task_id = result["request"]

    time.sleep(10)
    for _ in range(30):
        resp = requests.get("https://ocr.captchaai.com/res.php", params={
            "key": API_KEY, "action": "get",
            "id": task_id, "json": 1,
        }, timeout=15)
        data = resp.json()
        if data.get("status") == 1:
            return data["request"]
        if data["request"] != "CAPCHA_NOT_READY":
            raise RuntimeError(data["request"])
        time.sleep(5)

    raise TimeoutError("Solve timeout")

Kaydırıcı Konumu CAPTCHA'ları

Kaydırıcının belirli bir konuma sürüklenmesini gerektiren CAPTCHA'lar:

# slider_captcha.py
from selenium.webdriver.common.by import By
from selenium.webdriver.common.action_chains import ActionChains


def solve_slider_captcha(driver, captcha_selector):
    """Screenshot slider CAPTCHA and solve via CaptchaAI."""
    captcha = driver.find_element(By.CSS_SELECTOR, captcha_selector)
    image_b64 = captcha.screenshot_as_base64

    result = solve_custom_captcha(
        image_b64,
        "What pixel position should the slider be dragged to? "
        "Return only the X offset number."
    )

    try:
        offset = int(result)
    except ValueError:
        return False

    # Drag slider to position
    slider = driver.find_element(By.CSS_SELECTOR, ".slider-handle")
    ActionChains(driver).click_and_hold(slider).move_by_offset(offset, 0).release().perform()

    return True

Rotasyon CAPTCHA'ları

Bir görselin doğru yöne döndürülmesi gereken CAPTCHA'lar:

# rotation_captcha.py


def solve_rotation_captcha(driver, captcha_selector):
    """Solve rotation CAPTCHA."""
    captcha = driver.find_element(By.CSS_SELECTOR, captcha_selector)
    image_b64 = captcha.screenshot_as_base64

    result = solve_custom_captcha(
        image_b64,
        "How many degrees should this image be rotated clockwise "
        "to be in the correct upright orientation? Return only the number."
    )

    try:
        degrees = int(result)
    except ValueError:
        return False

    # Click rotation button the correct number of times
    rotate_btn = driver.find_element(By.CSS_SELECTOR, ".rotate-button")
    clicks = degrees // 90  # Each click rotates 90 degrees

    for _ in range(clicks):
        rotate_btn.click()
        time.sleep(0.3)

    return True

Seçim Sırası CAPTCHA'lar

Öğelerin belirli bir sırayla tıklanması gereken CAPTCHA'lar:

# order_captcha.py


def solve_order_captcha(driver, captcha_selector, item_selector):
    """Solve click-in-order CAPTCHA."""
    captcha = driver.find_element(By.CSS_SELECTOR, captcha_selector)
    image_b64 = captcha.screenshot_as_base64

    result = solve_custom_captcha(
        image_b64,
        "What is the correct order? Return as comma-separated "
        "numbers (1-indexed) representing positions left-to-right, top-to-bottom."
    )

    # Parse order
    try:
        order = [int(x.strip()) for x in result.split(",")]
    except ValueError:
        return False

    # Click items in order
    items = driver.find_elements(By.CSS_SELECTOR, item_selector)
    for idx in order:
        if 1 <= idx <= len(items):
            items[idx - 1].click()
            time.sleep(0.5)

    return True

Ses CAPTCHA'ları

Bazı siteler ses alternatifleri sunar:

# audio_captcha.py
import requests


def solve_audio_captcha(audio_url):
    """Download and solve an audio CAPTCHA."""
    # Download audio
    resp = requests.get(audio_url, timeout=30)
    audio_b64 = base64.b64encode(resp.content).decode("ascii")

    # Submit as image with instructions
    # CaptchaAI may support audio via the base64 method
    result = solve_custom_captcha(
        audio_b64,
        "This is an audio CAPTCHA. Transcribe the spoken characters."
    )
    return result

Özel Widget CAPTCHA'ları

Tamamen özel CAPTCHA widget'ları için:

# custom_widget.py
from selenium import webdriver
from selenium.webdriver.common.by import By


def handle_custom_widget(driver, widget_selector):
    """Handle an unknown custom CAPTCHA widget."""

    # Step 1: Screenshot the entire widget
    widget = driver.find_element(By.CSS_SELECTOR, widget_selector)
    image_b64 = widget.screenshot_as_base64

    # Step 2: Get any visible instructions
    try:
        instructions_el = widget.find_element(By.CSS_SELECTOR, ".instructions, .prompt, p")
        visible_instructions = instructions_el.text
    except Exception:
        visible_instructions = "Solve this CAPTCHA"

    # Step 3: Submit with descriptive instructions
    result = solve_custom_captcha(
        image_b64,
        f"CAPTCHA instructions: {visible_instructions}. "
        f"Return the answer text."
    )

    # Step 4: Try to submit result
    try:
        input_el = widget.find_element(By.CSS_SELECTOR, "input")
        input_el.clear()
        input_el.send_keys(result)
    except Exception:
        # No input — try clicking based on result
        driver.execute_script("""
            var input = document.querySelector('input[name*="captcha"]');
            if (input) input.value = arguments[0];
        """, result)

    return result

CAPTCHA Türü Algılama

# detector.py
import re


def detect_captcha_type(page_html):
    """Detect which CAPTCHA type is on a page."""
    checks = {
        "recaptcha_v2": r'data-sitekey.*g-recaptcha',
        "recaptcha_v3": r'recaptcha/api\.js\?render=',
        "turnstile": r'cf-turnstile|challenges\.cloudflare\.com/turnstile',
        "geetest": r'gt\b.*challenge|geetest',
        "bls": r'method.*bls|bls-captcha',
        "image_text": r'captcha.*\.(png|jpg|gif|jpeg)',
        "slider": r'slider.*captcha|slide.*verify',
        "audio": r'audio.*captcha|captcha.*audio',
    }

    detected = []
    for captcha_type, pattern in checks.items():
        if re.search(pattern, page_html, re.IGNORECASE):
            detected.append(captcha_type)

    return detected if detected else ["unknown"]

Sorun giderme

Sorun Sebep Düzeltme
ERROR_CAPTCHA_UNSOLVABLE Resim belirsiz veya talimatlar belirsiz Ekran görüntüsü kalitesini ve talimatları iyileştirin
Yanlış cevap biçimi Çözücü değer yerine açıklama döndürdü Spesifik olun: "Yalnızca numarayı döndürün"
Özel widget yakalanmadı Görünüm alanının dışındaki öğe Ekran görüntüsünden önceki öğeye ilerleyin
Etkileşim başarısız oluyor Yanlış tıklama koordinatları Çözümü gerçek kullanıcı arayüzü öğeleriyle dikkatli bir şekilde eşleyin

SSS

CaptchaAI herhangi bir CAPTCHA türünü çözebilir mi?

CaptchaAI, yerel olarak 27.500'den fazla CAPTCHA türünü destekler. Gerçekten yeni özel CAPTCHA'lar için resim + metin talimatları yaklaşımı en iyi kapsamı sağlar.

Özel CAPTCHA sık sık değişirse ne olur?

Mevcut sorunu tanımlamak ve uygun çözümleyiciye yönlendirmek için tür algılama işlevini kullanın.

Yeni bir CAPTCHA türü için nasıl destek alabilirim?

Örnek resimler ve site URL'si ile CaptchaAI desteğine başvurun. Platforma yeni türler eklenebilir.


İlgili Kılavuzlar


Tüm CAPTCHA'ları çözün —CaptchaAI ile başlayın.

Bu makale için yorumlar devre dışı bırakılmıştır.