Whatsapp bot made using python3 and selenium
To use the script, install the following dependencies first:
- Selenium
- Chrome Web Driver (mac version already provided inside driver folder)
- Bot to spy on a friend. This bot spy when your friend goes online and when he/she goes offline.
- An AI (can be used without smart reply also) based bot to chat with a friend.
- A bot to reply to users whenever someone texts you.
- A bot to send a message multiple times.
- A bot to reply to your friends whenever they reply on your WhatsApp status.
- Specify the chrome driver path while initializing Chrome
- Write the target name in the target variable
- Execute
python3 simple_message.py
- Specify the chrome driver path while initializing Chrome
- Write the target name in the target variable
- Choose the last seen visibility of the user
- Execute
python3 onlineState.py
- Specify the chrome driver path while initializing Chrome
- Write the target name in the target variable
- Execute
python3 messageReply.py
e
- Specify the chrome driver path while initializing Chrome
- Execute
python3 newMessageReply.py
Here, I have used Microsoft Azure QnA Maker
to make give smart replies. You can also it. If you don't want to make use of AI bots then simply adjust this to values ans = getAnswer(lm_text); sendMessage(ans)
in the file.
To use the bot, follow the steps mentioned in this doc https://docs.microsoft.com/en-us/azure/cognitive-services/QnAMaker/Quickstarts/create-publish-knowledge-base#create-a-bot .
Make suitable changes in the file. Add the API_KEY and the url. Feel free to use it.