Coder Social home page Coder Social logo

anticaptcha's Introduction

go-anticaptcha

Golang wrapper for anti-captcha online service which provides google recaptcha decodings.

This wrapper was implemented based on anti-captcha API documentation and follow the steps described in here.

As the documentation describes, the service receives a url and a recaptcha key, solves it and then return the gRecaptchaResponse key, that needs to be submitted in the website that has the captcha you are trying to solve, in the parameter g-recaptcha-response. The parameter name may be different, you can check more information on the following link.

Usually, the recaptcha key can be found in a parameter like that:

<div class="g-recaptcha" data-sitekey="6Lc_aCMTAAAAABx7u2W0WPXnVbI_v6ZdbM6rYf16"></div>

This link shows how to find the key if it isn't in the format above.

Example usage:

package main

import (
    "fmt"
    "github.com/nuveo/anticaptcha"
)

func main() {
    // Go to https://anti-captcha.com/panel/settings/account to get your key
    c := &anticaptcha.Client{APIKey: "your-key-goes-here"}

    key, err := c.SendRecaptcha(
        "http://http.myjino.ru/recaptcha/test-get.php", // url that has the recaptcha
        "6Lc_aCMTAAAAABx7u2W0WPXnVbI_v6ZdbM6rYf16", // the recaptcha key
    )
	if err != nil {
        fmt.Println(err)
	}else{
        fmt.Println(key)
    }    
}

Here's the example for regular catpchas (image to text):

package main

import (
    "fmt"
    "github.com/nuveo/anticaptcha"
)

func main() {
    // Go to https://anti-captcha.com/panel/settings/account to get your key
    c := &anticaptcha.Client{APIKey: "your-key-goes-here"}

    text, err := c.SendImage(
        "your-base64-string", // the image file encoded to base64
    )
	if err != nil {
        fmt.Println(err)
	}else{
        fmt.Println(text)
    }  
}


anticaptcha's People

Contributors

avelino avatar felipeweb avatar gtsalles avatar isabek avatar strongknit avatar

Watchers

 avatar

Forkers

morozken

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.