• Stars
    star
    220
  • Rank 180,422 (Top 4 %)
  • Language
    Python
  • License
    MIT License
  • Created over 6 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

This is a simple Web WhatsApp Bot developed in python using Selenium. Helpfull to send messages to whatsapp contacts automatically using web.whatsapp.com and web automation.

WhatsApp Bot

This is a simple Web WhatsApp Bot developed in python using Selenium. Selenium is used mainly for automating web applications for testing purposes, but is certainly not limited to just that. Boring web-based administration tasks can (and should!) be automated as well.

Selenium has the support of some of the largest browser vendors who have taken (or are taking) steps to make Selenium a native part of their browser. It is also the core technology in countless other browser automation tools, APIs and frameworks.

  • Send messages to family, friends and contacts automatically
  • Send specific message at specified time for all choosen contacts
  • Send the message in group also

Features!

  • Send a specific message to a particular contact at any time of the day
  • One can send a single message to multiple contacts over a specific time
  • Multiple messages to multiple contacts
  • It offers a delay so that WhatsApp can detect your are sending a URL and show its pop-up description.
  • It can search a contact from the list if the contact isn't present in the recent chats
  • Save the contact name, number in a xls file and save it in the same directory.
  • Change the message along with time in the whatsapp.py
  • You can add multiple messages
  • The Script can also search for the contact in the new chat list and then send message if the contact is not found in the recent chat list.

Requirements

Installation

Step 1: Install Selenium

$ pip3 install selenium

Step 2: Selenium requires a driver to interface with the chosen browser.

For Click for Chrome For Click for FireFox For Click for safari

Step 3: Extract the downloaded driver onto a folder

Step 4: Set path variable to the environment. Paste this command to the terminal

$ export PATH=$PATH:/home/path/to/the/driver/folder/
Eg: $ export PATH=$PATH:/home/harshit/Desktop/WhatsAppBot

Step 5: run whatsapp.py using Python3

$ python3 whatsapp.py

Step 6: When the browser is opened web.whatsapp.com will be opened and will ask to scan a QR code when you it first time

Step 7: After Scanning the QR code, you will be asked to press Enter Key in the terminal.

Note

You can also add Names of the contact you want to send message in the Contacts.txt file. The contact name should match exactly with the name saved in your contacts.