from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.common.keys import Keys import time
CHROMEDRIVER_PATH = "path/to/chromedriver" # Change this to your ChromeDriver path
options = webdriver.ChromeOptions() options.add_argument("--user-data-dir=whatsapp_session") # Keeps you logged in driver = webdriver.Chrome(executable_path=CHROMEDRIVER_PATH, options=options)
driver.get("https://web.whatsapp.com/") input("Press Enter after scanning the QR code...") # Wait for manual login
try: status_icon = driver.find_element(By.XPATH, "//span[@data-icon='status-v3']") status_icon.click() time.sleep(3) # Wait for the status list to load
# Find all available statuses
statuses = driver.find_elements(By.XPATH, "//div[contains(@class,'_3Q3Ui')]")
# Click and view each status
for status in statuses:
try:
status.click()
time.sleep(6) # Wait for status to be viewed before moving to the next
driver.find_element(By.TAG_NAME, "body").send_keys(Keys.ESCAPE) # Exit status view
time.sleep(1)
except Exception as e:
print(f"Error viewing status: {e}")
print("All statuses viewed successfully!")
except Exception as e: print(f"Error accessing statuses: {e}")
driver.quit()- 👋 Hi, I’m @Macnon
- 👀 I’m interested in ...
- 🌱 I’m currently learning ...
- 💞️ I’m looking to collaborate on ...
- 📫 How to reach me ...
- 😄 Pronouns: ...
- ⚡ Fun fact: ...