infosimples / anti_captcha Goto Github PK
View Code? Open in Web Editor NEWAntiCaptcha is a Ruby API for Anti-Captcha
License: MIT License
AntiCaptcha is a Ruby API for Anti-Captcha
License: MIT License
The client is missing a way to report incorrect recaptchas.
https://anticaptcha.atlassian.net/wiki/spaces/API/pages/632193041/reportIncorrectRecaptcha+send+complaint+on+a+Recaptcha
Just noticed that a Proxy Recaptcha task fails, with the following error from AntiCaptcha
ID: 24 | CODE: ERROR_INCORRECT_SESSION_DATA | Some of the required values for successive user emulation are missing. Missing property 'proxyAddress'
Had a look, it's because the params request has the details nested at the root level of the JSON payload, whereas if you look at the specs it should be nested in the task
element.
WHAT IT GENERATES
{
"clientKey": "dce6bcbb1a728ea8d871de6d169a2057",
"task": {
"type": "NoCaptchaTask",
"websiteURL": "http://mywebsite.com/recaptcha/test.php",
"websiteKey": "6Lc_aCMTAAAAABx7u2N0D1XnVbI_v6ZdbM6rYf16",
},
"proxyType": "http",
"proxyAddress": "8.8.8.8",
"proxyPort": 8080,
"proxyLogin": "proxyLoginHere",
"proxyPassword": "proxyPasswordHere",
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36"
}
WHAT IT SHOULD GENERATE
{
"clientKey":"dce6bcbb1a728ea8d871de6d169a2057",
"task":
{
"type":"NoCaptchaTask",
"websiteURL":"http://mywebsite.com/recaptcha/test.php",
"websiteKey":"6Lc_aCMTAAAAABx7u2N0D1XnVbI_v6ZdbM6rYf16",
"proxyType":"http",
"proxyAddress":"8.8.8.8",
"proxyPort":8080,
"proxyLogin":"proxyLoginHere",
"proxyPassword":"proxyPasswordHere",
"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36"
}
}
Tested the simple fix, which is in the Client.
lib/anti_captcha/client.rb
if PROXYABLE_TASKS.include?(type)
if proxy.nil?
args[:task][:type] += 'Proxyless'
else
args.merge!(
proxyType: proxy[:proxy_type],
proxyAddress: proxy[:proxy_address],
proxyPort: proxy[:proxy_port],
proxyLogin: proxy[:proxy_login],
proxyPassword: proxy[:proxy_password],
userAgent: proxy[:user_agent],
)
end
end
BECOMES
if PROXYABLE_TASKS.include?(type)
if proxy.nil?
args[:task][:type] += 'Proxyless'
else
args[:task].merge!(
proxyType: proxy[:proxy_type],
proxyAddress: proxy[:proxy_address],
proxyPort: proxy[:proxy_port],
proxyLogin: proxy[:proxy_login],
proxyPassword: proxy[:proxy_password],
userAgent: proxy[:user_agent],
)
end
end
It would be nice if this supported FunCaptcha or allowed passing any captcha type.
It would be good if there was also support for this type of captcha.
Hi, thank you for your gem, looks very good, but sometimes I have error "Caused by Net::ReadTimeout: Net::ReadTimeout"
Can we change TImeout for a little bit longer because some time is not enough time to get a response from anti-captcha service?
Thank you
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.