Karşılaştırmalar

Standart ve Kurumsal reCAPTCHA v2 Çözücü Farkları

Her iki sürüm de aynı "Ben robot değilim" onay kutusunu ve görüntü ızgarası zorluklarını sunar. Aradaki fark arka uçtadır: Enterprise, neden kodları, özel kurallar ve Google Cloud entegrasyonu ekler. Çözüm için tek değişiklik, CaptchaAI isteğinize enterprise=1 eklemektir; ancak bir sitenin hangi sürümü kullandığını tespit etmek, geliştiricilerin en sık yanlış yaptığı kısımdır.


Özellik karşılaştırması

Özellik Standart v2 Kurumsal v2
Onay kutusu widget'ı Evet — aynı görünüm Evet — aynı görünüm
İmaj zorlukları 3×3 veya 4×4 ızgaralar 3×3 veya 4×4 ızgaralar
JS dosyası api.js enterprise.js
İşlevi yürüt grecaptcha.execute() grecaptcha.enterprise.execute()
Doğrulama API'si siteverify (ücretsiz) recaptchaenterprise.googleapis.com (ücretli)
Sebep kodları Hayır Evet (OTOMASYON, TOO_MUCH_TRAFFIC vb.)
Özel kurallar Hayır Evet (işlem başına eşikler)
Google Bulut Konsolu Hayır Evet (proje bazlı yönetim)
Şifre sızıntısı tespiti Hayır Evet
Jeton formatı Aynı yapı Aynı yapı
CaptchaAI parametresi enterprise=1
Tipik çözüm süresi 10-30 saniye 10-30 saniye

Enterprise v2 nasıl tespit edilir

Temel fark, sayfanın hangi JavaScript dosyasını yüklediğidir:

Script etiketini kontrol edin:

<!-- Standard v2 -->
<script src="https://www.google.com/recaptcha/api.js"></script>

<!-- Enterprise v2 -->
<script src="https://www.google.com/recaptcha/enterprise.js"></script>

Otomatik algılama (Python):

import requests
from bs4 import BeautifulSoup

def detect_recaptcha_version(url):
    resp = requests.get(url)
    soup = BeautifulSoup(resp.text, "html.parser")

    enterprise_script = soup.find("script", src=lambda s: s and "enterprise.js" in s)
    standard_script = soup.find("script", src=lambda s: s and "recaptcha/api.js" in s)

    widget = soup.find(class_="g-recaptcha")
    sitekey = widget["data-sitekey"] if widget else None

    if enterprise_script:
        return {"version": "enterprise_v2", "sitekey": sitekey}
    elif standard_script:
        return {"version": "standard_v2", "sitekey": sitekey}
    return None

info = detect_recaptcha_version("https://staging.example.com/qa-login")
print(info)

Otomatik algılama (Node.js):

const axios = require("axios");
const cheerio = require("cheerio");

async function detectRecaptchaVersion(url) {
  const { data } = await axios.get(url);
  const $ = cheerio.load(data);

  const hasEnterprise = $('script[src*="enterprise.js"]').length > 0;
  const hasStandard = $('script[src*="recaptcha/api.js"]').length > 0;
  const sitekey = $(".g-recaptcha").attr("data-sitekey");

  if (hasEnterprise) return { version: "enterprise_v2", sitekey };
  if (hasStandard) return { version: "standard_v2", sitekey };
  return null;
}

Tarayıcı konsolu kontrolü:

// Quick check in DevTools
if (document.querySelector('script[src*="enterprise.js"]')) {
  console.log("Enterprise v2");
} else if (document.querySelector('script[src*="recaptcha/api.js"]')) {
  console.log("Standard v2");
}

CaptchaAI ile çözme

Standart v2

import requests
import time

# Submit task
resp = requests.get("https://ocr.captchaai.com/in.php", params={
    "key": "YOUR_API_KEY",
    "method": "userrecaptcha",
    "googlekey": sitekey,
    "pageurl": page_url
})
task_id = resp.text.split("|")[1]

# Poll for token
for _ in range(60):
    time.sleep(5)
    result = requests.get("https://ocr.captchaai.com/res.php", params={
        "key": "YOUR_API_KEY", "action": "get", "id": task_id
    })
    if result.text.startswith("OK|"):
        token = result.text.split("|")[1]
        break

Kurumsal v2

import requests
import time

# Submit task — only difference is enterprise=1
resp = requests.get("https://ocr.captchaai.com/in.php", params={
    "key": "YOUR_API_KEY",
    "method": "userrecaptcha",
    "googlekey": sitekey,
    "pageurl": page_url,
    "enterprise": 1  # Required for Enterprise
})
task_id = resp.text.split("|")[1]

# Polling is identical
for _ in range(60):
    time.sleep(5)
    result = requests.get("https://ocr.captchaai.com/res.php", params={
        "key": "YOUR_API_KEY", "action": "get", "id": task_id
    })
    if result.text.startswith("OK|"):
        token = result.text.split("|")[1]
        break

Otomatik algılayan evrensel çözücü

import requests
import time
from bs4 import BeautifulSoup

class RecaptchaV2Solver:
    def __init__(self, api_key):
        self.api_key = api_key

    def detect_and_solve(self, page_url, page_html=None):
        if not page_html:
            page_html = requests.get(page_url).text

        soup = BeautifulSoup(page_html, "html.parser")
        is_enterprise = bool(soup.find("script", src=lambda s: s and "enterprise.js" in s))
        widget = soup.find(class_="g-recaptcha")
        sitekey = widget["data-sitekey"] if widget else None

        if not sitekey:
            raise Exception("No reCAPTCHA sitekey found on page")

        params = {
            "key": self.api_key,
            "method": "userrecaptcha",
            "googlekey": sitekey,
            "pageurl": page_url
        }
        if is_enterprise:
            params["enterprise"] = 1

        resp = requests.get("https://ocr.captchaai.com/in.php", params=params)
        if not resp.text.startswith("OK|"):
            raise Exception(f"Submit failed: {resp.text}")

        task_id = resp.text.split("|")[1]

        for _ in range(60):
            time.sleep(5)
            result = requests.get("https://ocr.captchaai.com/res.php", params={
                "key": self.api_key, "action": "get", "id": task_id
            })
            if result.text.startswith("OK|"):
                return {
                    "token": result.text.split("|")[1],
                    "is_enterprise": is_enterprise,
                    "sitekey": sitekey
                }
            if result.text != "CAPCHA_NOT_READY":
                raise Exception(f"Solve failed: {result.text}")

        raise Exception("Solve timed out")


solver = RecaptchaV2Solver("YOUR_API_KEY")
result = solver.detect_and_solve("https://staging.example.com/qa-login")
print(f"Enterprise: {result['is_enterprise']}, Token: {result['token'][:40]}...")

Yaygın hatalar

hata Ne olur? Düzeltme
enterprise=1'yi standart v2'de kullanma Geçersiz jetonlar döndürebilir Bayrağı eklemeden önce enterprise.js'yi kontrol edin
Enterprise v2'de enterprise=1'nin atlanması Jeton site arka ucu tarafından reddedilebilir enterprise.js mevcut olduğunda her zaman enterprise=1'yi ekleyin
Yanlış site anahtarı kullanma ERROR_WRONG_GOOGLEKEY .g-recaptcha öğesindeki data-sitekey'den alıntı
v2 Enterprise'ı v3 Enterprise ile karıştırmak Yanlış çözüm parametreleri v2'de onay kutusu vardır; v3 skorla görünmez

Jeton enjeksiyonu – her ikisi için de aynı

# Selenium injection — works for both standard and enterprise
driver.execute_script(
    f'document.getElementById("g-recaptcha-response").value = "{token}";'
)

# If the page uses a callback function
callback = driver.find_element("css selector", ".g-recaptcha").get_attribute("data-callback")
if callback:
    driver.execute_script(f'{callback}("{token}");')
// Puppeteer injection — works for both
await page.evaluate((token) => {
  document.getElementById("g-recaptcha-response").value = token;
  // Find and call callback if present
  const widget = document.querySelector(".g-recaptcha");
  const cb = widget?.getAttribute("data-callback");
  if (cb && typeof window[cb] === "function") {
    window[cb](token);
  }
}, token);

SSS

Enterprise v2'yi çözmek daha mı zor?

Hayır. Mücadele mekaniği aynıdır; aynı onay kutusu, aynı resim ızgaraları. Enterprise, arka uç analitiğini (neden kodları, özel eşikler) ekler ancak çözümleyici için zorluğu değiştirmez.

Her iki sürüm için de aynı kodu kullanabilir miyim?

Neredeyse. Tek parametre farkı enterprise=1'dir. Her ikisini de idare eden bir kod tabanı oluşturmak için yukarıdaki otomatik algılama yaklaşımını kullanın. Algılama, yoklama ve jeton ekleme işlemleri aynıdır.

Kurumsal neden kodlarıyla ilgilenmem gerekiyor mu?

Hayır. Neden kodları, doğrulama sırasında Google tarafından web sitesinin arka ucuna gönderilir. CAPTCHA çözücüsü tarafından görülemezler. CaptchaAI entegrasyonunuzun neden kodlarında herhangi bir değişikliğe ihtiyacı yoktur.

Enterprise v2'nin çözümü daha pahalı mı?

CaptchaAI'nin mevcut fiyatlandırma sayfasını kontrol edin. Kurumsal çözümler farklı fiyatlandırılabilir ancak API entegrasyon çabası aynıdır.

Algılamanın doğru şekilde çalışıp çalışmadığını nasıl anlarım?

Standart bir site için enterprise=1 gönderirseniz çözüm başarılı olabilir ancak jeton hedef site tarafından reddedilebilir. Bir Kurumsal site için bunu atlarsanız aynı şey olabilir. Her zaman önce komut dosyası URL'sini kontrol ederek doğrulayın.


İlgili kılavuzlar

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