In this tutorial, you will learn:
- What Botright is and how it works
- How to use it for web scraping
- A step-by-step guide to solving CAPTCHAs with Botright
- Alternatives to Botright for CAPTCHA solving in scraping workflows
- Limitations of this library and how to overcome them
Let’s dive in!
What Is Botright?
Botright is an open-source Python web scraping framework for automating browser interactions and extracting data from websites. It leverages browser automation and stealth techniques to mimic real user behavior. This makes it effective for scraping dynamic websites and those protected by anti-bot systems such as Cloudflare.
It is based on Playwright and uses machine learning models to help you bypass CAPTCHAs. To accomplish their goals of stopping bots, CAPTCHAs are designed to be easy for humans to solve but difficult for automated scripts. Still, some machine learning models are powerful enough to outsmart them.
👍 Pros:
- Anti-Bot detection evasion: Botright is specifically built to bypass anti-bot systems. It achieves this through features like changing browser fingerprints, using real or modified browser engines, and simulating human-like interactions.
- Built-in CAPTCHA solving: It provides built-in machine learning capabilities to solve common CAPTCHAs.
- Handles dynamic content: As a browser automation tool, it handles JavaScript-heavy websites and dynamic content loading.
👎 Cons:
- Many dependencies: To expose its CAPTCHA-solving features, it relies on ssome math, machine learning, and advanced interaction libraries. These can make the full installation size reach a few GBs.
- Evolving anti-bot landscape: The effectiveness of any anti-detection library can diminish over time as websites update their bot detection techniques and CAPTCHAs.
- Not maintained: The library is not updated frequently and requires an older version of Python along with some manual tweaks to make it work.
How to Use Botright for Web Scraping
Remember that Botright is built on top of Playwright. Thus, after initializing it, you can use the API for web scraping exposed by vanilla Playwright:
Note that Botright is available only in asynchronous mode, which is why you must use it via asyncio
.
After the browser initialization in Botwright, you can use the Playwright API for web scraping.
How to Solve CAPTCHAs With Botright: Step-by-Step Guide
Botright’s real superpower is the ability to solve CAPTCHAs. According to the official GitHub page, these are the CAPTCHAs it can solve:
Captcha type | Solved by | Success rate |
---|---|---|
hCaptcha | hcaptcha-challenger |
Up to 90% |
reCaptcha | reCognizer |
From 50% to 80% |
v3 Intelligent Mode | Botright’s s stealthiness | 100% |
v3 Slider Captcha | cv2.matchTemplate |
100% |
v3 Nine Captcha | CLIP Detection | 50% |
v3 Icon Captcha | cv2.matchTemplate / SSIM / CLIP |
70% |
v4 Intelligent Mode | Botright’s s stealthiness | 100% |
v4 Slider Captcha | cv2.matchTemplate |
100% |
v4 GoBang Captcha | Math calculations | 100% |
v4 Icon Captcha | cv2.matchTemplate / SSIM / CLIP |
60% |
v4 IconCrush Captcha | Math calculations | 100% |
In this guided section, you will see how to solve a Google reCAPTCHA with Botright. Follow the steps below to achieve the goal!
Requirements
To reproduce this tutorial, you need to meet the following prerequisites:
- Python 3.10.11 installed.
- The latest version of
pip
.
Note: The most recent versions of Python will not work with Botright. So, you must have version 3.10.11 or lower installed on your machine.
Step #1: Project Setup and Botright Installation
At the end of this section, the botright_project/
representing your project folder will contain:
Where:
scraper.py
is the Python file with the Botright CAPTCHA-solving logic.venv/
is the Python 3.10 virtual environment.
On Windows, you can create the Python 3.10 virtual environment directory venv/
like so:
To activate it, run:
Equivalently, on Linux, execute:
Then, activate it with:
In the activated virtual environment, upgrade pip
to the latest version:
Then, install Botright with:
Notes:
--use-pep517
is mandatory to make sure that all legacy dependencies relying on apyproject.toml
file will be installed correctly.hcaptcha_challenger
has evolved a lot since the latest version of Botright was released. In detail, the latest version ofhcaptcha_challenger
no longer exposes the methods called by Botright behind the scenes. So, you must install a specific version to make the library work.
Great! Your environment is set up for solving CAPTCHAs with Botright.
Step #2: Define the Logic For CAPTCHAs Resolution
To solve CAPTCHAs with Botright, write the following code in the scraper.py
file:
The above code:
- Uses the method
new_browser()
to starts a Botright browser instance in headless mode, which is a special version of Chromium but optimized for stealth. - Creates a new page instance and opens the reCAPTCHA demo page on it.
- Solves the CAPTCHA with the method
solve_recaptcha()
. - Makes a screenshot of the solved CAPTCHA and closes the browser instance.
Note: Read the “Captcha Solving” section in the docs to learn the supported methods required to solve the other types of CAPTCHAs.
Perfect! You have written the logic to solve a reCAPTCHA with Botright.
Step #3: Run The Code
Run the code with:bash python scraper.py
This is what you will see when running the script in headed mode (headless=False
):
The screenshot.png
produced by the Botright script will contain:
Eventually, the script should detect all images and solve the CAPTCHAs automatically. However, since the accuracy is not guaranteed to be 100%, it may occasionally fail. In such cases, simply keep running the script until it succeeds. In production, you must implement automatic retry logic.
As you can see, Botright combines machine learning models with automated human-integration tools to:
- Understand what the CAPTCHA is asking
- Detect the images that match the required criteria
- Click on those images as a human would
Mission complete!
Alternatives to Botright for Solving CAPTCHAs
CAPTCHAs are effective even against most bots. While they can disrupt the experience for regular users, modern CAPTCHAs remain one of the main defenses against AI scrapers and crawlers. That is why they are becoming increasingly popular, as most websites want to protect their pages and data from the growing trend of AI bots.
Now, Botright is not the only tool capable of solving CAPTCHAs. If you need to bypass CAPTCHAs during scraping, consider the following alternative libraries and approaches:
- How to Bypass CAPTCHAs With Puppeteer
- How to Bypass CAPTCHAs With Selenium in Python
- How to Bypass CAPTCHAs With Playwright
- Guide to Web Scraping With SeleniumBase in 2025
- How to Use Undetected ChromeDriver for Web Scraping
- The 5 Best CAPTCHA Proxies of 2025
Limitations of Using Botright in Web Scraping
Botright is a fairly effective tool for CAPTCHA solving in web scraping, but it is far from perfect. The library uses machine-learning-based methods that do not always produce consistent results. Additionally, it is somewhat outdated and not frequently maintained.
That is a major issue, especially considering that modern CAPTCHAs are becoming increasingly complex. As a result, the machine learning models behind Botright would need regular updates to keep up.
In short, do not expect Botright to solve modern CAPTCHAs. That is especially true when faced by new puzzle-based CAPTCHAs like the ones provided by hCaptcha:
As shown in the earlier video result (recorded at 3x speed), Botright is not particularly fast. The reason is that it consumes a lot of computational resources to analyze each new image presented by reCAPTCHA and determine the correct one to click. In real-world scenarios, Botright can take up to 15 seconds to solve a reCAPTCHA. That is far too long for large-scale scraping operations.
Plus, Botright is also based on Playwright, which brings all the limitations typical of browser automation tools. These include issues with browser fingerprinting in headless mode and high resource consumption.
For faster and more consistent CAPTCHA solving in scraping workflows based on browser automation, a better option is to use a cloud-based browser optimized for web scraping. The solution is Scraping Browser.
Scraping Browser is a cloud scraping browser that offers built-in anti-bot bypass features, automatic IP rotation, browser fingerprinting protection, retry mechanisms, and—of course— CAPTCHA solving.
In particular, the solution can handle a wide range of CAPTCHAs, including reCAPTCHA, hCaptcha, px_captcha, SimpleCaptcha, GeeTest CAPTCHA, FunCaptcha, Cloudflare Turnstile, AWS WAF Captcha, KeyCAPTCHA, and many others.
Conclusion
In this article, you learned how Botright leverages browser automation and machine learning to solve CAPTCHAs for web scraping purposes. While it offers some flexible anti-bot capabilities, Botright suffers from slow performance, high resource consumption, outdated dependencies, and inconsistent results.
For businesses and teams that need a faster and easier solution for overcoming CAPTCHAs at scale, Bright Data offers several advanced products that go far beyond Botright’s open-source approach:
- CAPTCHA Solver: An enterprise-grade solver that supports a wide range of CAPTCHA types (including reCAPTCHA, hCaptcha, Cloudflare, and more) and delivers high success rates without heavy local dependencies.
- Scraping Browser: A cloud-based browser purpose-built for scraping, featuring automatic IP rotation, built-in anti-bot protections, and seamless CAPTCHA solving—all managed in the cloud for efficiency and reliability.
- Web Unlocker: A next-generation unlocking engine designed to handle the toughest anti-bot and anti-CAPTCHA challenges, automatically choosing the best approach for every site request with zero manual intervention.
- Proxy Services: Access to the world’s largest proxy pool (residential, datacenter, and mobile) to bypass geo-restrictions and increase anonymity—essential for high-volume or distributed scraping projects.
- Scraper APIs: Tools for extracting structured web data at scale, with anti-blocking and CAPTCHA-solving baked into every request, plus intuitive management dashboards.
With Bright Data, you can scrape websites of any complexity, save engineering resources, and guarantee compliance with industry best practices. Start your free trial now!
No credit card required