This Python project aims to automate the process of checking and downloading WhatsApp status updates that have not been viewed within the last hour. Additionally, it provides the functionality to post these downloaded statuses on Twitter.
To run this project, ensure that you have the following:
- Python (version 3.x) installed on your system.
pip
package manager installed.
- Clone this repository to your local machine.
- Navigate to the project directory.
- Install the required dependencies by running the following command:
pip install -r requirements.txt
Before running the project, you need to configure the necessary settings:
- Download ChromeDriver that is of the same version as your Chrome browser. goto
chrome://version/
to check your Chrome Version. - Extract chromedriver from the zip into this folder
assest/driver
- Afterwards, ensure all required in the
config.py
are provided (PHONE_ID, CONTACTS and TOKEN).
See WhatsApp Business Cloud API for your infomations.
REMEMBER: THE GENERATED TOKEN EXPIRES EVERY 24HOURS.
- Then navigate to this project folder, open
main.py
. - Edit
driverpath
variable to your driver path. - Edit
timezone
variable to your location time zone. - Edit
options.add_argument(r'user-data-dir=YOUR-USER-DATA-DIR')
. - Edit
options.add_argument(r'--profile-directory=YOUR-PROFILE-DIR')
. - Edit the global vairable
statusUploaderName
to your desired ContactName (make sure it is exactly how it is saved on your phone(Case Sensitive)).
-
WhatsApp Configuration: You really do not need to do anything because you would login into WhatsApp Web when the program is ran for the first time (Scan WhatsApp Barcode to log in).
-
Twitter Configuration: Open the
main.py
and findstatus_captions: Optional[Dict]
, comment out both places where found and run program to open and log in into Twitter.
-
Run the
main.py
script to initiate the WhatsApp status checking and downloading process:python main.py
This script will check a specified WhatsApp contact status every hour(1 hour by default) and download any unviewed statuses and then tweet them.
-
You can modify the frequency of status checks or customize the behavior by adjusting the settings in the
config.py
file.
With this WhatsApp Status Downloader and Twitter Bot, you can effortlessly keep track of unviewed WhatsApp statuses and share them on your Twitter feed. Feel free to explore and enhance the project according to your needs and preferences. Happy downloading and tweeting!