Skip to content

Instantly share code, notes, and snippets.

@omersho11
Last active May 11, 2017 19:21
Show Gist options
  • Save omersho11/3abdac9fee9adab1201e891c79203f24 to your computer and use it in GitHub Desktop.
Save omersho11/3abdac9fee9adab1201e891c79203f24 to your computer and use it in GitHub Desktop.
Whatsapp web spamming bot
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
driver = webdriver.Chrome("C:\Python27\Lib\site-packages\selenium\webdriver\chromedriver.exe")
driver.set_page_load_timeout(30)
driver.maximize_window()
driver.get("https://web.whatsapp.com/")
print "Log into Whatsapp web!"
while True:
msg = raw_input("what msg? -> ")
times = int(raw_input("how many times? -> "))
for item in range(times):
element = driver.find_elements_by_class_name('input')[1]
element.send_keys(msg)
element.send_keys(Keys.RETURN)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment