WhatsApp bot for Auto replying & sending images via Python and Selenium
Author : Anubhav Chaturvedi
Are you the one who wants to send Lots of Quotes or Shayaris to your Ex or to a whatsApp friends or colleague group or random emojis to your wife or Latest gf? This blog will help you out in programming a bot to impress them.
Here comes the demo:
Bot performing auto replying and login
For implementing this you will need Jupyter Python notebooks installed .You can use this procedure illustrated over here for installation on windows or Linux :
Also we will be using Selenium which is an automatic testing tool compatible with Java,Ruby ,Python and many other programming languages.
In order to install the selenium dependencies we will use pip (package installer for python) :
!pip install selenium
!pip install webdriver_manager
For every block to run , we will use Shift+Enter to execute the relevant command.
Along with this you will import the files like this :
from selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager
import random
from selenium.webdriver.common.keys import Keys
In order to open Google Chrome from Jupyter notebook automatically we will use “chrome” element as an object from webdriver package and give it relevant URL to open (Web.whatsapp.com for WhatsApp web)
chrome = webdriver.Chrome(ChromeDriverManager().install())
chrome.get