Blog
How to solve MTCaptcha with Python

How to solve MTCaptcha with Python

Logo of Capsolver

CapSolver Blogger

How to use capsolver

22-Sep-2023

Solving MTCaptcha , MTCaptcha , MTCaptcha  with Python, MTCaptcha  python solver

⚙️ Prerequisites

  • A working proxy (OPTIONAL)
  • Python installed
  • Capsolver API key

🤖 Step 1: Install Necessary Packages

Execute the following commands to install the required packages:

pip install capsolver

👨‍💻 Python Code for solve MTCaptcha without proxy

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

import capsolver

capsolver.api_key = "your pay per usage key"
PAGE_URL = "websiteURL"
PAGE_KEY = "website site key"

def solver_mtcaptcha(url,key):
    solution = capsolver.solve({
        "type": "MTCaptchaTaskProxyless",
        "websiteURL": url,
        "websitePublicKey":key
    })
    return solution


def main():

    print("Solving MTCaptcha...")
    solution = solver_mtcaptcha(PAGE_URL, PAGE_KEY)
    print("Solution: ", solution)

if __name__ == "__main__":
    main()

⚠️ Change these variables

  • PROXY: Update with your proxy details. The format should be http://username:password@ip:port.
  • 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 mtcaptcha
  • PAGE_KEY: Replace with the KEY of the website

👀 More information

More