-
The purpose of this project is to find a way to automate information propagation.
-
It is in a very early state. Bugs are expected.
-
I've made it using Python and Selenium Library.
Here's a small video i've made showing off some of it's functionalities, it is in brazilian portuguese.
Clicking the image will redirect you to a video hosted on my personal website.
- Installing Selenium:
!pip install selenium
- Installing ChromeDriver:
- Download ChromeDriver here on it's official website.
- Make sure to have the most compatible version with your browser.
- Paste the chromedriver.exe file on your C:\Program Files\Python folder.
- Import our "Bot" class and inform those contact names which you want to exchange messages with.
from whatsappbot import Bot
input_contact_name = "Input"
output_contact_name = "Output"
bot = Bot(input_contact_name, output_contact_name)
bot.run()
-
Then, you'll need to connect to whatsapp by scanning a QR code showed on your screen.
-
After that, messages sent to the Input contact will automatically be sent to the Output contact.
If you're willing to copy messages from one or various persons in a group, you'll need to populate a list with their names OR phone numbers and then reference it on the "Bot" creation function.
Something like this:
from whatsappbot import Bot
input_contact_name = "Group 1"
output_contact_name = "Group 2"
messager_names = ["Gabriel", "Marcos", "Thalles", "Davi", "Guilherme", "Caio", "Luiz", "Cândido"]
messager_numbers = ["+55 61 3686-4237", "+55 91 3613-3162"]
bot = Bot(input_contact_name, output_contact_name, messagername=messager_names, messagernumber=messager_numbers)
bot.run()
- Send short messages, long messages, stacked phrases, messages with links without a link preview, pictures with text, text with emojis.
- Reply normal text, text with emojis and text with links.
- Send audios, stickers, pictures with no text, messages with emojis only, messages with a link preview.
- Reply audios, stickers and pictures.
- These features will be implemented within further updates.
If you try to do something not metioned in the "Things it can do" section, the program will probably crash. There are a lot of exceptions and cases that need to be analyzed and solved.
I made this project for personal use only.
This is the first "application" I have done.
I don't think the code is pretty, it lacks organization and may not be optimized. For now, I won't make updates, it has taken a lot of time from me, but I've learned a lot from it.
Again, the program is in a very early state, there's plenty of bugs that I haven't figured out how to solve yet. Also, it can stop working due to the browser's loading time and other exceptions.