Web Scraping With Botright: 2025 Guide

Discover the pros, cons, and top alternatives to Botright for fast, scalable CAPTCHA solving in modern web scraping workflows.
9 min read
web scraping with Botright blog image

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:

import asyncio
import botright

async def main():
    # Create a Botright browser instance
    botright_client = await botright.Botright()
    browser = await botright_client.new_browser()

    # Create a new page instance
    page = await browser.new_page()

    # Visit the target page
    await page.goto("https://example.com")

    # Scraping logic with the Playwright API...

    # Close the botright browser instance
    await botright_client.close()

# Execute the scraper function
if __name__ == "__main__":
    asyncio.run(main())

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:

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:

botright_project/
    ├── scaper.py
    └── venv/

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:

py -3.10 -m venv venv

To activate it, run:

venv\Scripts\activate

Equivalently, on Linux, execute:

python3.10 -m venv venv

Then, activate it with:

source venv/bin/activate

In the activated virtual environment, upgrade pip to the latest version:

python -m pip install --upgrade pip

Then, install Botright with:

pip install botright --use-pep517
pip install hcaptcha_challenger==="0.10.1.post2"

Notes:

  • --use-pep517 is mandatory to make sure that all legacy dependencies relying on a pyproject.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 of hcaptcha_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:

import asyncio
import botright

async def scraper():
    # Start the Botright instance
    botright_client = await botright.Botright(headless=True)
    browser = await botright_client.new_browser()

    # Create a new page instance
    page = await browser.new_page()

    # Open the target web page with the reCAPTCHA demo
    await page.goto("https://www.google.com/recaptcha/api2/demo")

    # Solve the CAPTCHA
    await page.solve_recaptcha()

    # Screenshot the page to capture the solved CAPTCHA
    await page.screenshot(path="screenshot.png")

    # Close the botright browser instance
    await botright_client.close()

# Execute the scraper function
if __name__ == "_main_":
    asyncio.run(scraper())

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):

Botright in action at CAPTCHA solving

The screenshot.png produced by the Botright script will contain:

The reCAPTCHA challenge has been solved automatically

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:

  1. Understand what the CAPTCHA is asking
  2. Detect the images that match the required criteria
  3. 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:

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:

A modern puzzle-based CAPTCHA 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