Documentation
¶
Index ¶
- Variables
- type CallOption
- func WithAPIServer(apiServer string) CallOption
- func WithAction(action string) CallOption
- func WithCallProxy(proxy, proxytype string) CallOption
- func WithCaseSensitive(caseSensitive int) CallOption
- func WithCookies(cookies string) CallOption
- func WithEnterprise() CallOption
- func WithInstructions(instructions string) CallOption
- func WithInvisible() CallOption
- func WithLang(lang string) CallOption
- func WithMaxLen(maxLen int) CallOption
- func WithMinLen(minLen int) CallOption
- func WithMinScore(score float64) CallOption
- func WithNumeric(numeric int) CallOption
- func WithPhrase(phrase int) CallOption
- func WithUserAgent(userAgent string) CallOption
- func WithVersion(version string) CallOption
- type Client
- func (c *Client) BLS(ctx context.Context, images []any, instructions string, opts ...CallOption) (SolveResult, error)
- func (c *Client) Captchafox(ctx context.Context, sitekey, url string, opts ...CallOption) (SolveResult, error)
- func (c *Client) Close()
- func (c *Client) CloudflareChallenge(ctx context.Context, url string, opts ...CallOption) (SolveResult, error)
- func (c *Client) FriendlyCaptcha(ctx context.Context, sitekey, url string, opts ...CallOption) (SolveResult, error)
- func (c *Client) Geetest(ctx context.Context, gt, challenge, url string, opts ...CallOption) (SolveResult, error)
- func (c *Client) GetResult(ctx context.Context, captchaType, taskID string) (SolveResult, error)
- func (c *Client) Grid(ctx context.Context, image any, instructions, gridSize string, ...) (SolveResult, error)
- func (c *Client) Lemin(ctx context.Context, captchaID, divID, url string, opts ...CallOption) (SolveResult, error)
- func (c *Client) Normal(ctx context.Context, image any, opts ...CallOption) (SolveResult, error)
- func (c *Client) RecaptchaV2(ctx context.Context, sitekey, url string, opts ...CallOption) (SolveResult, error)
- func (c *Client) RecaptchaV3(ctx context.Context, sitekey, url string, opts ...CallOption) (SolveResult, error)
- func (c *Client) Send(ctx context.Context, captchaType string, params map[string]any) (string, error)
- func (c *Client) ThreadsInfo(ctx context.Context) (ThreadUsage, error)
- func (c *Client) Turnstile(ctx context.Context, sitekey, url string, opts ...CallOption) (SolveResult, error)
- type Error
- type ErrorKind
- type Option
- func WithAutoRetry(autoRetry bool) Option
- func WithBaseURL(baseURL string) Option
- func WithHTTPClient(client *http.Client) Option
- func WithMaxPollSeconds(seconds float64) Option
- func WithMaxRetries(maxRetries int) Option
- func WithProxy(proxy, proxytype string) Option
- func WithThreadBusyTimeout(seconds float64) Option
- type SolveResult
- type ThreadUsage
- type Transport
- type UniformResponse
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidKey = &Error{Kind: KindInvalidKey} ErrValidation = &Error{Kind: KindValidation} ErrProxy = &Error{Kind: KindProxy} ErrThreadLimit = &Error{Kind: KindThreadLimit} ErrNoThreads = &Error{Kind: KindNoThreads} ErrUnsolvable = &Error{Kind: KindUnsolvable} ErrAPI = &Error{Kind: KindAPI} ErrNetwork = &Error{Kind: KindNetwork} ErrTimeout = &Error{Kind: KindTimeout} )
Functions ¶
This section is empty.
Types ¶
type CallOption ¶
type CallOption func(*callOptions)
func WithAPIServer ¶
func WithAPIServer(apiServer string) CallOption
func WithAction ¶
func WithAction(action string) CallOption
func WithCallProxy ¶
func WithCallProxy(proxy, proxytype string) CallOption
func WithCaseSensitive ¶
func WithCaseSensitive(caseSensitive int) CallOption
func WithCookies ¶
func WithCookies(cookies string) CallOption
func WithEnterprise ¶
func WithEnterprise() CallOption
func WithInstructions ¶
func WithInstructions(instructions string) CallOption
func WithInvisible ¶
func WithInvisible() CallOption
func WithLang ¶
func WithLang(lang string) CallOption
func WithMaxLen ¶
func WithMaxLen(maxLen int) CallOption
func WithMinLen ¶
func WithMinLen(minLen int) CallOption
func WithMinScore ¶
func WithMinScore(score float64) CallOption
func WithNumeric ¶
func WithNumeric(numeric int) CallOption
func WithPhrase ¶
func WithPhrase(phrase int) CallOption
func WithUserAgent ¶
func WithUserAgent(userAgent string) CallOption
func WithVersion ¶
func WithVersion(version string) CallOption
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) BLS ¶
func (c *Client) BLS(ctx context.Context, images []any, instructions string, opts ...CallOption) (SolveResult, error)
func (*Client) Captchafox ¶
func (c *Client) Captchafox(ctx context.Context, sitekey, url string, opts ...CallOption) (SolveResult, error)
func (*Client) CloudflareChallenge ¶
func (c *Client) CloudflareChallenge(ctx context.Context, url string, opts ...CallOption) (SolveResult, error)
func (*Client) FriendlyCaptcha ¶
func (c *Client) FriendlyCaptcha(ctx context.Context, sitekey, url string, opts ...CallOption) (SolveResult, error)
func (*Client) Geetest ¶
func (c *Client) Geetest(ctx context.Context, gt, challenge, url string, opts ...CallOption) (SolveResult, error)
func (*Client) Grid ¶
func (c *Client) Grid(ctx context.Context, image any, instructions, gridSize string, opts ...CallOption) (SolveResult, error)
func (*Client) Lemin ¶
func (c *Client) Lemin(ctx context.Context, captchaID, divID, url string, opts ...CallOption) (SolveResult, error)
func (*Client) Normal ¶
func (c *Client) Normal(ctx context.Context, image any, opts ...CallOption) (SolveResult, error)
func (*Client) RecaptchaV2 ¶
func (c *Client) RecaptchaV2(ctx context.Context, sitekey, url string, opts ...CallOption) (SolveResult, error)
func (*Client) RecaptchaV3 ¶
func (c *Client) RecaptchaV3(ctx context.Context, sitekey, url string, opts ...CallOption) (SolveResult, error)
func (*Client) ThreadsInfo ¶
func (c *Client) ThreadsInfo(ctx context.Context) (ThreadUsage, error)
func (*Client) Turnstile ¶
func (c *Client) Turnstile(ctx context.Context, sitekey, url string, opts ...CallOption) (SolveResult, error)
type ErrorKind ¶
type ErrorKind int
ErrorKind classifies every failure the SDK can return. It mirrors the Python exception hierarchy as a single error type usable with errors.Is.
type Option ¶
type Option func(*config)
func WithAutoRetry ¶
func WithBaseURL ¶
func WithHTTPClient ¶
func WithMaxPollSeconds ¶
func WithMaxRetries ¶
func WithThreadBusyTimeout ¶
type SolveResult ¶
type SolveResult struct {
TaskID string
Solution any
UserAgent string
Raw map[string]any
RawText string
}
SolveResult is the single return type for every solve.
func (SolveResult) String ¶
func (r SolveResult) String() string
type ThreadUsage ¶
Click to show internal directories.
Click to hide internal directories.