This project is a WhatsApp automation bot developed using Selenium WebDriver. The bot provides various functionalities such as logging in, sending messages, sending media, and checking for new messages on WhatsApp Web.
MIT License
This project is a WhatsApp automation bot developed using Selenium WebDriver. The bot provides various functionalities such as logging in, sending messages, sending media, and checking for new messages on WhatsApp Web.
To use this bot, follow these steps:
Clone the Repository:
git clone https://github.com/marco0antonio0/py-connector-whatsapp-unofficial
cd py-connector-whatsapp-unofficial
Install Dependencies: Ensure you have Python installed. Then install the required Python packages:
pip install selenium webdriver-manager pillow
Start the code of the path main: for the start python script, so execute :
python3 main.py
Now to necessary login: The login is necessary for the use script where is execute in localhost when the your machine Now check if the bash console is if the show you an qrcode message
Now this code is Already complete start: The started progamme is sucessfull
Initialize the Bot:
from services import automation
# with interface = true
#without interface = false // terminal acess
bot = automation(gui=False)
Start the Bot:
# if gui= true so the show with interface
# else so the without interface
bot.start(gui=false)
Send a Message:
bot.openChatByContact("Contact Name")
bot.sendMensage("Hello, this is a test message!")
Send an Image with Text:
bot.sendImageWithText("path/to/image.jpg", "Here is an image with a caption!")
Check for New Messages:
new_message = bot.VerificarNovaMensagem()
if new_message:
print("New message from:", new_message)
Retrieve Last Message:
last_message = bot.pegar_ultima_mensagem()
print("Last message:", last_message)
Exit the Bot:
bot.exit()
py-connector-whatsapp-unofficial/
│
├──main.py
├── requirements.txt # List of dependencies
├── README.md # Project documentation
├── dados/ # Directory to store session data
└──servies/
├── bot.py # Main bot class and functionalities
└── generateQRcode.py # QR code generation module
git checkout -b feature-branch
).git commit -m 'Add new feature'
).git push origin feature-branch
).This project is licensed under the MIT License. See the LICENSE file for details.
For any questions or suggestions, feel free to open an issue or contact me at [email protected].