Skip to content

Instantly share code, notes, and snippets.

@Ehsanghodrati
Last active June 12, 2025 08:49
Show Gist options
  • Select an option

  • Save Ehsanghodrati/7b300710f3ee34c4d63be97eb7b152ea to your computer and use it in GitHub Desktop.

Select an option

Save Ehsanghodrati/7b300710f3ee34c4d63be97eb7b152ea to your computer and use it in GitHub Desktop.
whatup checker
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import time
driver = webdriver.Chrome()
driver.get("https://web.whatsapp.com/")
input("Enter: ")
with open("C:/Users/Msi/Desktop/phone.txt", "r") as f:
for line in f:
line = line.strip()
driver.get(f"https://web.whatsapp.com/send?phone={line}")
time.sleep(8)
try:
driver.find_element("xpath",'//*[@id="app"]/div/span[2]/div/span/div/div/div/div/div/div[1]').text == "Phone number shared via url is invalid."
print(f"{line} - Not Registered on WhatsApp")
except:
f = open("C:/Users/Msi/Desktop/Active.txt", "a")
f.write(f"\n{line}")
f.close()
print(f"{line} - registered on WhatsApp")
driver.quit()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment