• Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office
AnonyViet - English Version
  • Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office
No Result
View All Result
  • Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office
No Result
View All Result
AnonyViet - English Version
No Result
View All Result

How to bypass Google Captcha with python

AnonyViet by AnonyViet
February 23, 2023
in Tips
0

This article is for those of you who are doing reg tools, registering multiple accounts on the website. Or maybe it’s crawling data and getting caught in captcha without knowing how to solve it. When caught in captcha, you have to spend 3 -5 seconds to solve them. For normal users, it’s okay, but for tool users to create from a few hundred to a few thousand accounts or requests, this is not a solution. So in this article, I will show you how to solve Google captcha with Python super easy.

CAPTCHA stands for Completely Automated Public Turing test to tell Computers and Humans Apart. A CAPTCHA is a tool used to distinguish between real users and computers, such as bots. CAPTCHAs present challenges that are difficult for computers to do but relatively easy for humans. For example, identify letters or choose a traffic light in a hard-to-see photo.

CAPTCHA works by providing information to real users to decode. Traditional CAPTCHAs provide distorted or overlapping letters and numbers for user confirmation. Distorted letters make it difficult for bots to decipher and prevent access until the captcha is verified.

Since CAPTCHA was introduced, bots using machine learning have been developed. These bots are better able to verify traditional CAPTCHAs using algorithms that are trained many times over. As a result of this development, newer CAPTCHA methods based on more complex tests are born. For example, reCAPTCHA requires clicking on a specific area and waiting until the solve is successful.

Get AzCaptcha’s KeyAPI

Step 1: First, you go to AZcaptcha website and register a new account. Each newly created account will be given $0.02, you can solve 10 to 20 times depending on the type of Captcha. Note: I recommend that you use a temporary email to create an account. If you run out of money, just create another new account.

Step 2: On the dashboard page, you will see the keyAPI on the right side, copy that keyAPI.

How to bypass Google Captcha with python 4

How to bypass Google Captcha with python

First, you need to make sure your system has full python, pip. Then install 2 more packages request and bs. I will also use the site reCaptcha demo as an example in this article.

You press F12 search for keywords sitekey equal Ctrl + F.

How to bypass Google Captcha with python 5

As you can see above, the div tag has the class “g-recaptcha” and the data-sitekey is “6Le-wvk……”. In python there is a library that helps us to disassemble the html and get the data-sitekey inside the div tag bs4.

from bs4 import BeautifulSoup
import requests
from time import sleep

URL = 'https://www.google.com/recaptcha/api2/demo'

def get_siteKey(url):
    response = requests.get(url)
    soup = BeautifulSoup(response.text, "html.parser")
    g_recaptcha = soup.find_all('div', {'class' : 'g-recaptcha'})
    sitekey = g_recaptcha[0].get('data-sitekey')
    return sitekey

Next is the solve_Captcha function used to solve the captcha. You replace {keyAPI} with the API you get in the AZcaptcha page. After sending the request to solve the captcha successfully, the server will send the id of your captcha. This ID is used to identify the captcha that you send to the server. You should let the program stop for about 30 seconds for the server to solve the captcha.

def solve_Captcha(REQ_URL, url, keyAPI, sitekey):
    payload = {
        'key': keyAPI,
        'method': 'userrecaptcha',
        'googlekey': sitekey,
        'pageurl': url,
        'here': 'now'
    }
    response = requests.post(REQ_URL, data=payload)
    return response

BASE_URL = 'http://azcaptcha.com'
REQ_URL = BASE_URL + '/in.php'
RES_URL = BASE_URL + '/res.php'
keyAPI = '{keyAPI}'

response = solve_Captcha(REQ_URL, URL, keyAPI, siteKey)
if response.status_code == 200:
    print('Solving captcha...')
    id = response.text.split('|')[1]
    sleep(30)

Next, you use the get_gCaptcha function to check if the captcha has been solved. If done, we will get gCaptcha, and if not done, we continue to call the get_gCaptcha function again to check.

def get_gCaptcha(RES_URL, keyAPI, id):
    payload = {
        'key': keyAPI,
        'action': 'get',
        'id': id,
    }
    response = requests.post(RES_URL, data = payload)
    if response.text == 'CAPCHA_NOT_READY':
        print('CAPTCHA NOT READY. Try again in 30s.')
        sleep(30)
        gCaptcha = get_gCaptcha(RES_URL, keyAPI, id)
        return gCaptcha
    if 'OK' in response.text:
        gCaptcha = response.text.split('|')[1]
        return gCaptcha

Full code:

from bs4 import BeautifulSoup
import requests
from time import sleep

URL = 'https://www.google.com/recaptcha/api2/demo'

def get_siteKey(url):
    response = requests.get(url)
    soup = BeautifulSoup(response.text, "html.parser")
    g_recaptcha = soup.find_all('div', {'class' : 'g-recaptcha'})
    sitekey = g_recaptcha[0].get('data-sitekey')
    return sitekey

siteKey = get_siteKey(URL)
print(siteKey)
def solve_Captcha(REQ_URL, url, keyAPI, sitekey):
    payload = {
        'key': keyAPI,
        'method': 'userrecaptcha',
        'googlekey': sitekey,
        'pageurl': url,
        'here': 'now'
    }
    response = requests.post(REQ_URL, data=payload)
    return response
def get_gCaptcha(RES_URL, keyAPI, id):
    payload = {
        'key': keyAPI,
        'action': 'get',
        'id': id,
    }
    response = requests.post(RES_URL, data = payload)
    if response.text == 'CAPCHA_NOT_READY':
        print('CAPTCHA NOT READY. Try again in 30s.')
        sleep(30)
        gCaptcha = get_gCaptcha(RES_URL, keyAPI, id)
        return gCaptcha
    if 'OK' in response.text:
        gCaptcha = response.text.split('|')[1]
        return gCaptcha
    
BASE_URL = 'http://azcaptcha.com'
REQ_URL = BASE_URL + '/in.php'
RES_URL = BASE_URL + '/res.php'
keyAPI = '{keyAPI}'

response = solve_Captcha(REQ_URL, URL, keyAPI, siteKey)
if 'OK' in response.text:
    print('Solving captcha...')
    id = response.text.split('|')[1]
    sleep(30)
    gCaptcha = get_gCaptcha(RES_URL, keyAPI, id)
    print(gCaptcha)
else:
    print(response.text)

You have successfully obtained the gCaptcha code. Next, you just need to replace the gCaptcha code on the page you want to pass the captcha by using the excute javascript command below:

document.getElementById("g-recaptcha-response").innerHTML="{gCaptcha}";

That’s it, then. Good luck.

Tags: BypassCaptchaGooglePython
Previous Post

Instructions to find your Facebook ID

Next Post

Code Create a widget on Facebook – Multi-Function Synthesis

AnonyViet

AnonyViet

Related Posts

Instructions for Logo Design in just a few clicks with Logaster
Tips

Instructions for Logo Design in just a few clicks with Logaster

July 20, 2026
3 coolest ways to turn off your computer
Tips

3 coolest ways to turn off your computer

July 19, 2026
Instructions for checking Windows copyright using Powershell to avoid penalties
Tips

Instructions for checking Windows copyright using Powershell to avoid penalties

July 19, 2026
Who leaked Windows 11?
Tips

Who leaked Windows 11?

July 18, 2026
Instructions for Getting Netflix 30 Days Free to Watch Movies
Tips

Instructions for Getting Netflix 30 Days Free to Watch Movies

July 18, 2026
How to create a website introducing yourself using Bio Link for free
Tips

How to create a website introducing yourself using Bio Link for free

July 17, 2026
Next Post
Code Create a widget on Facebook – Multi-Function Synthesis

Code Create a widget on Facebook - Multi-Function Synthesis

0 0 votes
Article Rating
Subscribe
Login
Notify of
guest

guest

0 Comments
Oldest
Newest Most Voted

Recent News

Instructions for Logo Design in just a few clicks with Logaster

Instructions for Logo Design in just a few clicks with Logaster

July 20, 2026
Clean Tam – Accompanying the green space of every Vietnamese family

Clean Tam – Accompanying the green space of every Vietnamese family

July 20, 2026
3 coolest ways to turn off your computer

3 coolest ways to turn off your computer

July 19, 2026
Instructions on how to get Norton 360 Deluxe for 1 year for free

Instructions on how to get Norton 360 Deluxe for 1 year for free

July 19, 2026
Instructions for Logo Design in just a few clicks with Logaster

Instructions for Logo Design in just a few clicks with Logaster

July 20, 2026
Clean Tam – Accompanying the green space of every Vietnamese family

Clean Tam – Accompanying the green space of every Vietnamese family

July 20, 2026
3 coolest ways to turn off your computer

3 coolest ways to turn off your computer

July 19, 2026
AnonyViet - English Version

AnonyViet

AnonyViet is a website share knowledge that you have never learned in school!

We are ready to welcome your comments, as well as your articles sent to AnonyViet.

Follow Us

Contact:

Email: anonyviet.com[@]gmail.com

Main Website: https://anonyviet.com

Recent News

Instructions for Logo Design in just a few clicks with Logaster

Instructions for Logo Design in just a few clicks with Logaster

July 20, 2026
Clean Tam – Accompanying the green space of every Vietnamese family

Clean Tam – Accompanying the green space of every Vietnamese family

July 20, 2026
  • Home
  • Home 2
  • Home 3
  • Home 4
  • Home 5
  • Home 6
  • Next Dest Page
  • Sample Page

say88 tỷ lệ kèo nhà cái kèo nhà cái 5 febet

No Result
View All Result
  • Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office

say88 tỷ lệ kèo nhà cái kèo nhà cái 5 febet

wpDiscuz
0
0
Would love your thoughts, please comment.x
()
x
| Reply