https://github.com/weaming/2captcha-pool
2captcha.com 's result pool
https://github.com/weaming/2captcha-pool
2captcha recaptcha recaptcha-v2
Last synced: about 1 month ago
JSON representation
2captcha.com 's result pool
- Host: GitHub
- URL: https://github.com/weaming/2captcha-pool
- Owner: weaming
- Created: 2020-05-16T12:50:37.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-11-21T10:41:41.000Z (over 5 years ago)
- Last Synced: 2025-01-12T20:45:45.904Z (over 1 year ago)
- Topics: 2captcha, recaptcha, recaptcha-v2
- Language: Go
- Homepage:
- Size: 1.57 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 2captcha-pool
[2captcha.com](https://2captcha.com) 's result pool
```shell
docker run -it --rm -e API_KEY= weaming/2captcha-pool
```
```go
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
* POST `/getOne`: get one [`response` result](https://developers.google.com/recaptcha/docs/verify#api_request). Start or stop task automatically
```sh
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}'
```