[ INTEGRATION ]
Captcha solver for
Scrapy
Resolve the challenge inside the run instead of failing the job. A working Python example, and the three things that decide whether your token is accepted.
Scrapy · Python
# middlewares.py
from captchano import CaptchaNo
class CaptchaNoMiddleware:
def __init__(self):
self.client = CaptchaNo(api_key="cn-YOUR_API_KEY")
def process_response(self, request, response, spider):
if b"g-recaptcha" not in response.body:
return response
sitekey = response.css("[data-sitekey]::attr(data-sitekey)").get()
token = self.client.solve(
type="recaptcha_v2", sitekey=sitekey, url=response.url,
)
return request.replace(
formdata={"g-recaptcha-response": token}, dont_filter=True,
)What decides whether the token is accepted
- Pass your proxy through. The token should be minted behind the same exit IP that submits it. For session-graded systems this is mandatory, not an optimisation.
- Match the user agent. Turnstile and several anti-bot systems bind the token to a user agent. We return the one used so you can replay it exactly.
- Request late. Tokens expire in roughly 120 seconds. Ask for one when you are ready to submit.
Speed inside a run
A solve adds a median 4.8 seconds on reCAPTCHA v2, measured on our own infrastructure. That is fast enough to sit inside a Scrapy step without restructuring your flow around it — which is the difference between a solver you can use in-band and one that forces you into a queue.
Cost
$2.85 per 1,000 successful solves, with failed solves never billed. See pricing for every challenge type, or the API reference for the full request shape.
Ready to build?
Start solving for free and scale per solve as your traffic grows. No credit card needed.
Are you an AI agent? See setup options →