Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hollali/whatsapp_bot
This script sends a scheduled WhatsApp message using the pywhatkit library. Simply provide the recipient's phone number, message content, and the desired time for sending. Ensure that your WhatsApp Web is logged in on your default browser and that you have an active internet connection. Customize and run the script to automate sending WhatsApp mess
https://github.com/hollali/whatsapp_bot
python pywhatkit
Last synced: 14 days ago
JSON representation
This script sends a scheduled WhatsApp message using the pywhatkit library. Simply provide the recipient's phone number, message content, and the desired time for sending. Ensure that your WhatsApp Web is logged in on your default browser and that you have an active internet connection. Customize and run the script to automate sending WhatsApp mess
- Host: GitHub
- URL: https://github.com/hollali/whatsapp_bot
- Owner: hollali
- Created: 2024-07-17T08:24:54.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-07-17T08:32:11.000Z (6 months ago)
- Last Synced: 2024-11-12T15:13:58.934Z (2 months ago)
- Topics: python, pywhatkit
- Language: Python
- Homepage:
- Size: 1000 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
Certainly! Here is a README for the given code:
WhatsApp Message SenderThis script sends a WhatsApp message to a specified phone number using the pywhatkit library.
PrerequisitesPython installed on your system.
pywhatkit library installed. You can install it using pip:bash
pip install pywhatkit
Usage
Clone or download the repository:
bash
git clone Whatsapp_bot
cd Whatsapp_botEdit the script: Update the phone_number, message, hour, and minute variables in the script with the desired values.
Run the script:
bash
python send_whatsapp_bot.py
Example
Here is an example of how to use the script:
python
import pywhatkit as kit
# Phone number should include the country code
phone_number = '+233505036932'
message = "Hi"
# Time in 24-hour format
hour = 5
minute = 19# Send the WhatsApp message
kit.sendwhatmsg(phone_number, message, hour, minute)print("Message sent successfully!")
In this example, the script will send a WhatsApp message saying "Hi" to the phone number +233505036932 at 05:19 AM.
NotesEnsure that your computer has an active internet connection.
Your WhatsApp Web must be logged in on the default web browser.
The script should be run a few minutes before the scheduled time to allow it to open the browser and send the message.