All generations.

generate functionSun, 30 Jul 2023

una función para programar mensajes automaticos por whatsapp

from selenium import webdriver def send_message(message): driver = webdriver.Chrome('/path/to/chromedriver') driver.get("https://web.whatsapp.com/") input("Press anything after QR scan") name_box = driver.find_element_by_class_name("_2S1VP") name_box.send_keys(message) sendbutton = driver.find_elements_by_class_name('_35EW6') sendbutton[1].click() driver.quit() send_message("Hello World! :)")

Python
View
generate functionSun, 30 Jul 2023

una función para programar mensajes automaticos por whatsapp

from selenium import webdriver driver = webdriver.Chrome() driver.get('https://web.whatsapp.com/') name = input('Enter the name of user or group : ') msg = input('Enter the message : ') count = int(input('Enter the count : ')) input('Enter anything after scanning QR code') user = driver.find_element_by_xpath('//span[@title = "{}"]'.format(name)) user.click() msg_box = driver.find_element_by_class_name('_3u328') for i in range(count): msg_box.send_keys(msg) button = driver.find_element_by_class_name('_3M-N-') button.click()

Python
View

Questions about programming?Chat with your personal AI assistant