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.

Whatsapp

Package pysashapy/pyWAppSel implements the WhatsApp Web API to provide a clean interface for developers. The official WhatsApp Business API was released in August 2018. You can check it out here.

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='full path to downloaded files')

# 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.

Legal

This code is in no way affiliated with, authorized, maintained, sponsored or endorsed by WhatsApp or any of its affiliates or subsidiaries. This is an independent and unofficial software. Use at your own risk.

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.5.tar.gz (13.4 kB view details)

Uploaded Source

Built Distribution

pyWAppSel-1.0.5-py3-none-any.whl (13.2 kB view details)

Uploaded Python 3

File details

Details for the file pyWAppSel-1.0.5.tar.gz.

File metadata

  • Download URL: pyWAppSel-1.0.5.tar.gz
  • Upload date:
  • Size: 13.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/1.5.0 colorama/0.4.4 CPython/3.10.0

File hashes

Hashes for pyWAppSel-1.0.5.tar.gz
Algorithm Hash digest
SHA256 ce8f8dd1b8adfbe7e7e059a94f443986159f7619b8a4f457b97bf93900b67f16
MD5 06e4e4183d557bea1b5e262698683c10
BLAKE2b-256 1dbb8d9c11bdf57a4623254a2fcc6b863e81d68687aca5e8f4d000ed0c2e9e0a

See more details on using hashes here.

File details

Details for the file pyWAppSel-1.0.5-py3-none-any.whl.

File metadata

  • Download URL: pyWAppSel-1.0.5-py3-none-any.whl
  • Upload date:
  • Size: 13.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/1.5.0 colorama/0.4.4 CPython/3.10.0

File hashes

Hashes for pyWAppSel-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 6f1037411b7d2548fe8729a1923d1b5737b27092b71db7febb53e9f59a57325a
MD5 58e962c0e9c69f0e1eca5ecdebaae4d1
BLAKE2b-256 5a32af8f43d3959c7412b58c464ab80a123168fcfdd15cc8204cc3f508cc2d6b

See more details on using hashes here.

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