BLS CAPTCHA, hangi hücrelerin seçileceğini belirten sayısal bir talimat koduyla birlikte 3x3'lük bir resim ızgarası sunar. Bu eğitimde, BLS CAPTCHA'leri Node.js'den nasıl çözebileceğiniz gösterilmektedir.CaptchaAIAPI'dir.
Önkoşullar
| Öğe | Değer |
|---|---|
| CaptchaAI API anahtarı | İtibarencaptchaai.com |
| Node.js | 14+ |
| Kütüphane | axios (npm install axios) |
BLS CAPTCHA nasıl çalışır?
Soldan sağa, yukarıdan aşağıya numaralandırılmış 3 × 3 ızgara:
1 | 2 | 3
---------
4 | 5 | 6
---------
7 | 8 | 9
Sayısal bir talimat (örneğin, "664") neyin seçileceğini belirtir. CaptchaAI eşleşen hücrelerin indekslerini döndürür.
1. Adım: Izgara görüntülerini çıkarın
const axios = require('axios');
const puppeteer = require('puppeteer');
const browser = await puppeteer.launch();
const page = await browser.newPage();
await page.goto('https://example.com/bls-form');
// Get instruction code
const instruction = await page.$eval('.bls-instruction', (el) => el.textContent.trim());
// Get all 9 cell image URLs and convert to base64
const cellImages = await page.$$eval('.bls-grid img', (imgs) =>
imgs.map((img) => img.src)
);
const images = [];
for (const src of cellImages) {
if (src.startsWith('data:')) {
images.push(src);
} else {
const { data } = await axios.get(src, { responseType: 'arraybuffer' });
const b64 = Buffer.from(data).toString('base64');
images.push(`data:image/png;base64,${b64}`);
}
}
Adım 2: CaptchaAI'ye Gönderin
const API_KEY = 'YOUR_API_KEY';
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
const params = new URLSearchParams({
key: API_KEY,
method: 'bls',
instructions: instruction,
json: '1',
});
// Add all 9 images
images.forEach((img, i) => {
params.append(`image_base64_${i + 1}`, img);
});
const { data: submitData } = await axios.post(
'https://ocr.captchaai.com/in.php',
params.toString()
);
if (submitData.status !== 1) throw new Error(submitData.request);
const taskId = submitData.request;
console.log(`Task submitted: ${taskId}`);
3. Adım: Çözüm için anket yapın
await sleep(5000);
let selectedCells;
for (let i = 0; i < 30; i++) {
const { data: pollData } = await axios.get('https://ocr.captchaai.com/res.php', {
params: { key: API_KEY, action: 'get', id: taskId, json: 1 },
});
if (pollData.status === 1) {
selectedCells = JSON.parse(pollData.request);
console.log('Selected cells:', selectedCells);
break;
}
if (pollData.request !== 'CAPCHA_NOT_READY') {
throw new Error(pollData.request);
}
await sleep(5000);
}
Adım 4: Doğru hücreleri tıklayın
// Click each identified cell
const gridCells = await page.$$('.bls-grid img');
for (const cellNum of selectedCells) {
await gridCells[cellNum - 1].click();
}
// Submit the form
await page.click('.bls-submit');
console.log(`Solved: clicked cells ${JSON.stringify(selectedCells)}`);
await browser.close();
Beklenen çıktı:
Selected cells: [1, 4, 7, 8]
Solved: clicked cells [1,4,7,8]
Yaygın hatalar
| Hata | Sebep | Düzeltme |
|---|---|---|
ERROR_BAD_PARAMETERS |
Eksik resimler veya talimatlar | 9 resmin tamamını ve talimat kodunu gönderin |
CAPCHA_NOT_READY |
Hala işleniyor | Her 5 saniyede bir oylamaya devam edin |
ERROR_ZERO_BALANCE |
Fon yok | CaptchaAI hesabınızı doldurun |
SSS
BLS CAPTCHA 4×4 ızgaraları destekliyor mu?
BLS CAPTCHA 3×3 ızgaralar (9 hücre) kullanır. 4×4 ızgaralar için bunun yerine Izgara Görüntüsü yöntemini kullanın.
BLS ne kadar hızlı çözüyor?
Tipik olarak 5-15 saniye.
Puppeteer yerine Oyun Yazarı'nı kullanabilir miyim?
Evet. API etkileşimi aynıdır; yalnızca tarayıcı otomasyon çağrılarını değiştirmeniz yeterlidir.