Code Monkey home page Code Monkey logo

auto-whatsapp's Introduction

auto_whatsapp

Automating WhatsApp using python with custom multiple messaging options, attachment options and supporting images and video sending as well. auto_whatsapp also persist your login state once QR code is scanned on web whatsapp.

Setup

Installation

In the terminal type the following

pip install auto_whatsapp

Usage

Import auto_whatsapp module use its sendChat function to send messages.

from auto_whatsapp import auto_whatsapp

msg = 'This is a test message'
users = ["user1", "user2", "+91 9876543210"]
auto_whatsapp.sendChat(users, msg)

users1 and user2 are saved contact name according to your use case.
Messages can also be send to unsaved contacts like +91 9876543210 as shown above. Just run the code you can see the magic happening. It will open web whatsapp automatically send the given message to specified users.

Make sure you have selenium installed
pip install selenium
and have chromedriver in the same directory. If you don't have chromedriver installed click here


Examples

Sending a document

from auto_whatsapp import auto_whatsapp

users = ["user1", "user2", "+91 9876543210"]
src = 'C:\\Users\\Your_user\\Desktop\\dots.jpg'
auto_whatsapp.sendDoc(users, src)

Note that you have to provide absolute path as src argument and with double backslackes(\) as shown in example.

Sending a media

Media can be images, videos or audio which whatsapp supports.

from auto_whatsapp import auto_whatsapp

users = ["user1", "user2", "+91 9876543210"]
src = 'C:\\Users\\Your_user\\Desktop\\dots.jpg'
auto_whatsapp.sendMedia(users, src)

Note that you have to provide absolute path as src argument and with double backslackes(\) as shown in example.


License

auto_whatsapp is been licensed under MIT LICENSE

auto-whatsapp's People

Contributors

adil-01 avatar

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.