pyWAppSel is a selenium-based Whatsapp wrapper
Project description
pyWAppSel
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)
Built Distribution
pyWAppSel-1.0.4-py3-none-any.whl
(12.3 kB
view hashes)
Close
Hashes for pyWAppSel-1.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c1f465b99a1551fa33aaf079df92f3e816eff5e170af85aad87af90e59dfe6b1 |
|
MD5 | 1fbaed8bac349163390f916d704e358f |
|
BLAKE2b-256 | b58dffeb1348c4f17b14e39915380d067d06274ac35256861c53b10386900f25 |