عکس falahati
WhatsApp web client automation using selenium in PythonPython
موضوع‌ها
۲
فورک‌ها
۳
ستاره‌ها
۵
تاریخ ایجاد
۶ اردیبهشت ۱۳۹۸
آخرین بروزرسانی
بیشتر از ۱ سال قبل
لایسنس
Apache License 2.0

PyWhatsAppWeb

PyWhatsAppWeb is a fork from the @shauryauppal's similar project named PyWhatsapp that allows users to automate the process of sending WhatsApp messages. The goal of this fork is to increase the stability of the script and allows sending hundreds if not thousands of messages or files to users.

This project provides the following features:

  1. Getting the complete list of contacts
  2. Getting the complete list of recent chats
  3. Search in contacts
  4. Search in recent chats
  5. Sending media messages with a caption
  6. Sending files
  7. Sending text messages
  8. Keeping logged-in status after restarts

And includes an example which sends the files located in the 'Work' folder. Read more below.

How to get

You need to clone or download this project using the top right green button.

Help me fund my own Death Star

--OR--

You can always donate your time by contributing to the project or by introducing it to others.

How to use

  1. Install Python 2.7+ or Python 3+
  2. Install Selenium by executing pip install selenium
  3. Install PyAutoIt by navigating to the 'pyautoit' folder and executing python setup.py install
  4. Download the corresponding ChromeDriver and put it next to the script
  5. Download and install the latest version of AutoIt
  6. Create a folder named 'Work' and copy your files to it
  7. Execute python PyWhatsAppWeb.py

Notes

  • File names must contain the full phone number of the person you want to send the message to, containing the country and area code without the leading zeros or the plus sign (Example: '98XXXXXXXXXX.jpg') or the name of the contact in your contact list (Example: 'John.pdf').
  • Image and video files will be sent as media attachments; text files as messages and other types of files as file attachments.
  • If the phone number is invalid or the contact doesn't exist; the file will be moved to the 'Work\Invalid' folder; otherwise it will be moved to the 'Work\Sent' folder. If it fails to send the message for any other reason the file will remains in place.
  • The code only exits if there is no file directly in the 'Work' folder anymore.
  • Attachments are only available when executed under Windows; this is due to using AutoIt for selecting the attachment file.
  • To close the program you need to press CTRL+C two times; last one being in the "Waming-Up..." stage as the code runs in a loop.

License

Copyright (C) 2019-2020 Soroush Falahati

Released under the Apache-2.0 license

Idea and project fundation from @shauryauppal's PyWhatsapp