weaming/2captcha-pool

CAPTCHAFORUM

Administrator
1634226172798.png
https://githubmemory.com/repo/weaming/2captcha-pool
2captcha.com 's result pool

Code:
docker run -it --rm -e API_KEY=<your-2captcha-key> weaming/2captcha-pool
API_KEY         = getEnvDefault("API_KEY", "")

type Task struct {
GoogleKey string `json:"googleKey"`
PageURL   string `json:"pageUrl"`
Size      int    `json:"size"`
Interval  int    `json:"interval"`
Lives     int    `json:"lives"` // after n token unused, stop loop
}

type Site struct {
sync.Mutex // lock for idle state
task       *Task
ids        chan string
results    *Cache
stop       chan bool
idle       bool
}

API
Code:
curl https://2captcha-pool.drink.cafe/getOne \
    -d '{"googleKey": "6LerB_cSAAAAACHfjoc7wuQ28ssaqm2mEZN02s3d", "pageUrl": "https://www.google.com/recaptcha/api2/demo", "size": 2, "interval": 10, "lives": 1}'