Code Monkey home page Code Monkey logo

whatsfly's Introduction

WhatsFly

Just run and have fun. Just try and go fly.

WhatsApp web wrapper in Python. No selenium nor gecko web driver needed.

Setting up browser driver are tricky for python newcomers, and thus it makes your code so 'laggy'.

I knew that feeling. It's so painful.

So I make WhatsFly, implementing Whatsmeow --a golang based WhatsApp library. It will make his wrapper easy to use without sacrificing the speed and perfomance.

Installation

  pip install whatsfly

or :

  pip install --upgrade whatsfly

Usage/Examples

from whatsfly import WhatsApp

chat = WhatsApp()

# send mesage
chat.send_message(phone="6283139750000", message="Hello World!")

# send image
chat.send_image(phone="6283139750000", image_path="path/to/image.jpg" caption="Hello World!")

Features

Feature Status
Multi Device
Send messages
Receive messages
Send image
Send media (audio/documents) soon!
Send media (video) soon!
Send stickers soon!
Receive media (images/audio/video/documents)
Send contact cards soon!
Send location soon!
Send buttons soon!
Send lists soon!
Receive location soon!
Message replies soon!
Join groups by invite soon!
Get invite for group soon!
Modify group info (subject, description) soon!
Modify group settings (send messages, edit info) soon!
Add group participants soon!
Kick group participants soon!
Promote/demote group participants soon!
Mention users soon!
Mute/unmute chats soon!
Block/unblock contacts soon!
Get contact info soon!
Get profile pictures soon!
Set user status message soon!
React to messages soon!

Something missing? Make an issue and let us know!

Supported machines

Architecture Status
Linux amd64
Linux ARM64
Linux 686
Linux 386
Windows amd64
Windows 32 bit soon!
OSX arm64 soon!
OSX amd64 soon!

Support this Project

This project is maintained during my free time. If you'd like to support my work, please consider making a pull request to help fix any issues with the code. I would like to extend my gratitude to the open-source developers behind tls-client, tiktoken, and whatsmeow. Their work has inspired me greatly and helped me to create this project.

whatsfly's People

Contributors

blaggacao avatar cloned-doy avatar otamay avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

whatsfly's Issues

hi im new to py

This is my code
image
this is the error
image

I'm using py 3.9 windows 10
image

free(): invalid pointer Aborted

image
with very minimal example

from whatsfly import WhatsApp

chat = WhatsApp()

# send mesage
chat.send_message(phone="myPhoneNumber", message="Hello World!")

example code not work, and make session crashed for unknown reason on google colab

info

  • env : google colab
  • os : ubuntu jammy x86_64
  • python : 3.10.12

steps

pip install -U whatsfly
!wget -c 'https://i.ytimg.com/vi/vEYsdh6uiS4/maxresdefault.jpg'
from whatsfly import WhatsApp
chat = WhatsApp()
# send mesage
chat.sendMessage(phone = "6283139750000", message = "oi")
# send mesage
chat.sendImage(phone = "6283139750000", image_path = "maxresdefault.jpg", caption = "oi")

result
not work, and make session crashed for unknown reason on google colab

best regards

Decrypt the poll votes

The poll votes are encrypted when seen from python, and i've seen a DecryptPollVote function on whatsmeow... so i guess the poll votes should be decrypted using this function on the go event handler part.

Version outdated Error

hi @cloned-doy,

Thanks for the incredible library. I been using it to do some what app automation.
Suddenly last week my setup have a (V 0.0.22) version outdated error. I assume its due to Whats_app changing their UI. anyway i try updating it to the latest 0.0.231, when testing, nothing in the Shell.

I hope someone can point me to right direction to keep my app functional.

panic: runtime error: invalid memory address or nil pointer dereference

panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x8 pc=0x584966da]

goroutine 17 [running, locked to thread]:
go.mau.fi/libsignal/state/record.(*State).SenderChainKey(...)
/home/doy/go/pkg/mod/go.mau.fi/[email protected]/state/record/SessionState.go:297
go.mau.fi/libsignal/session.(*Cipher).Encrypt(0xc0001a71b0, {0xc00115a700, 0x447, 0x700})
/home/doy/go/pkg/mod/go.mau.fi/[email protected]/session/SessionCipher.go:71 +0x7a
go.mau.fi/whatsmeow.(*Client).encryptMessageForDevice(0xc0001c6800, {0xc001142000, 0x438, 0x438}, {{0xc00157e460, 0xd}, 0x0, 0x0, {0x5886473e, 0xe}, ...}, ...)
/home/doy/go/pkg/mod/go.mau.fi/[email protected]/send.go:706 +0x67d
go.mau.fi/whatsmeow.(*Client).encryptMessageForDeviceAndWrap(0x7?, {0xc001142000?, 0x1?, 0x3?}, {{0xc00157e460, 0xd}, 0x0, 0x0, {0x5886473e, 0xe}, ...}, ...)
/home/doy/go/pkg/mod/go.mau.fi/[email protected]/send.go:678 +0x59
go.mau.fi/whatsmeow.(*Client).encryptMessageForDevices(0xc0001c6800, {0x5897aaf0, 0xc00001c0e0}, {0xc001140ea0, 0x4, 0x5897f150?}, {{0xc000187ee0, 0xd}, 0x0, 0x2, ...}, ...)
/home/doy/go/pkg/mod/go.mau.fi/[email protected]/send.go:662 +0x3ec
go.mau.fi/whatsmeow.(*Client).prepareMessageNode(0x1ee40c50a28?, {0x5897aaf0, 0xc00001c0e0}, {{0xc00157e1b0, 0xd}, 0x0, 0x0, {0x5886473e, 0xe}, 0x0}, ...)
/home/doy/go/pkg/mod/go.mau.fi/[email protected]/send.go:560 +0x45f
go.mau.fi/whatsmeow.(*Client).sendDM(0xc0001a7ac0?, {0x5897aaf0, 0xc00001c0e0}, {{0xc00157e1b0, 0xd}, 0x0, 0x0, {0x5886473e, 0xe}, 0x0}, ...)
/home/doy/go/pkg/mod/go.mau.fi/[email protected]/send.go:439 +0x385
go.mau.fi/whatsmeow.(*Client).SendMessage(0xc0001c6800, {0x5897aaf0, 0xc00001c0e0}, {{0xc00157e1b0, 0xd}, 0x0, 0x0, {0x5886473e, 0xe}, 0x0}, ...)
/home/doy/go/pkg/mod/go.mau.fi/[email protected]/send.go:167 +0x85c
main.SendMessage(0x0?, 0xc000052301?)
/home/doy/code/whatsfly/whatsfly/dependencies/main.go:104 +0x1d3

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.