Skip to main content

pyWAppSel is a selenium-based Whatsapp wrapper

Project description

pyWAppSel

image image

pyWAppSel is a Python library with various helpful features. It's easy-to-use and does not require you to do any additional setup.

Installation and Supported Versions

pyWAppSel is available on PyPi:

pip install pyWAppSel

pyWAppSel officially supports Python 3.8+.

Cloning the Repository

git clone https://github.com/pysashapy/pyWAppSel.git
pip install selenium webdriver_manager

Features

  • Sending Message to a WhatsApp Group or Contact
  • Sending Image/Video/Document/Sticker/ to a WhatsApp Group or Contact
  • Downloading Videos/Photos/Sticker/Voice Message from Group and Contact
  • Listening to one or all Group or Contact
  • get a qr code link for authorization from the console
  • Install and Use

Usage

Quick Start

from pyWAppSel.types import FileTypes
from pyWAppSel.Client import WhatsApp, Messenger

# start selenium and auth
client = WhatsApp(path_download='download')

# auth
if not client.isLogin(wait_time=100):
    client.login()

# open chat, get names chats, get first chat
messenger = Messenger(client=client)


# if the "chat name" is incomplete then the first chat in the search will be selected
chat = messenger.openChat(name='CHAT NAME')

# send text message
chat.sendText(text='Hello, world!')
# send photo
chat.sendFile(path_file='data/test.jpg', type_attachment=FileTypes.PHOTO_VIDEO)
# send video
chat.sendFile(path_file='data/test.mp4', type_attachment=FileTypes.PHOTO_VIDEO)
# send document
chat.sendFile(path_file='data/test.jpg', type_attachment=FileTypes.DOCUMENT)
# send sticker
chat.sendFile(path_file='data/test.jpg', type_attachment=FileTypes.STICKER)

# returns a sheet with the name of the chats that have been added to the number book
names_chats = messenger.getChatsFromBook()
print(names_chats)

# returns a list with the names of all chats
names_all_chats = messenger.getAllChats()
print(names_all_chats)

# close WebDriver
client.close()

For more Examples and Functions, have a look at the Example.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

Apache Software License (Apache 2.0). For more information see this

NOTICE this

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyWAppSel-1.0.4.tar.gz (12.2 kB view hashes)

Uploaded Source

Built Distribution

pyWAppSel-1.0.4-py3-none-any.whl (12.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page