Blog
How to solve reCaptcha v3 with Python

How to solve reCaptcha v3 with Python

Logo of Capsolver

CapSolver Blogger

How to use capsolver

15-Sep-2023

Solve reCaptcha v3 with Python, reCaptcha v3 python solver

⚙️ Prerequisites

  • Python installed
  • Capsolver API key

🤖 Step 1: Install Necessary Packages

Execute the following commands to install the required packages:

pip install capsolver

👨‍💻 Step 2: Python Code for solve reCaptcha v3 and get 0.7-0.9 score

Here's a Python sample script to accomplish the task:

import json
import os
import capsolver
from urllib.parse import urlparse

# Change these values
capsolver.api_key = "YourApiKey"
PAGE_URL = ""
PAGE_KEY  = ""
PAGE_ACTION = ""

def solve_recaptcha_v3(url,key,pageAction):
    solution = capsolver.solve({
        "type": "ReCaptchaV3TaskProxyLess",
        "websiteURL": url,
        "websiteKey":key,
        "pageAction":pageAction
    })
    return solution


def main():

    print("Solving reCaptcha v3")
    solution = solve_recaptcha_v3(PAGE_URL, PAGE_KEY, PAGE_ACTION)
    print("Solution: ", solution)

if __name__ == "__main__":
    main()

⚠️ Change these variables

  • capsolver.api_key: Obtain your API key from the Capsolver Dashboard.
  • PAGE_URL: Replace with the URL of the website for which you wish to solve the reCaptcha v3.
  • PAGE_KEY: Update with the specific key of the site with recaptcha.
  • PAGE_ACTION: Replace with the pageAction of the page. You can read this blog

👀 More information

More