Make OWN Bulk Google Index Checker Using Python & Colab

Furious Man

Elite Member
Jr. VIP
Joined
Aug 4, 2015
Messages
4,543
Reaction score
680
Hello Friends,

Today am Going to show you "How to make own bulk google index checker using Colab with Python"

Step 1: Sign in the Google Account and go to Google Colab

Step 2: Install the beautifulsoap and Google by using following code

Code:
pip install beautifulsoup4

fANigp.png

Code:
pip install google

u5ROhn.png

Step 3: Click the folder icon in the leftsiderbar and right click to choose "Newfile" and rename as domains.txt

KG1uMN.png

Step 4: Double click the domaint.txt, the editor is opened on right side and enter the urls or domains in the editor

VjLY3c.png

Step 5: Paste the below code and click play to check the index status, suppose if you get any errors, please change the TLD in the code or else login the colab with some other mail id

Code:
try:
    from googlesearch import search
except ImportError:
    print("No module named 'google' found")

# Read domains from the uploaded "domains.txt" file
domains_to_check = []
with open("domains.txt", "r") as file:
    domains_to_check = [line.strip() for line in file.readlines()]

# Initialize serial number
serial_number = 1

for domain in domains_to_check:
    query = f"site:{domain}"  # Create a query using the "site:" operator
    found = False  # Initialize a flag to check if the domain is indexed

    # Perform the Google search with num=1
    for _ in search(query, tld="co.in", num=1, stop=1, pause=2):
        found = True
        break  # If a result is found, set found=True and exit the loop

    # Display the result
    if found:
        print(f"{domain} - Indexed")
    else:
        print(f"{domain} - Not Indexed")

    serial_number += 1  # Increment serial number for the next domain

s2fKiA.png

For further queries about the working procedure please discuss here, thank you
 
Great stuff! Some improvements can be for multiple indexing queries (cache:url and "url" along with site:url), and of course for any bulk checking you'll need proxy support.
 
my domain uses an ip domain, what is the for _ in search(query, tld="co.in", num=1, stop=1, pause=2): I need to change that too
 
Back
Top