Code Monkey home page Code Monkey logo

whatsapp-web's Introduction

whatsapp-web

Yo! Use WhatsApp from the command line.

Chat everywhere you couldn't before... like at your desk. Hah ๐Ÿธ

You can only send messages. You can send and receive messages.

Features

  • Send and receive messages to and from any contact/group in your WhatsApp from command line.
  • Switch between different chats from command line.
  • You can only send/receive text messages. Emoji, image, audio, video or anything else is not supported right now. Yeah, it sucks, I know. But.. but it's command-line. :neckbeard:

Requirements

  • Python 3 Tested with 3.4.3, 3.6.1. Python 2 will not work
  • selenium Tested with 2.53.6, 3.4.2
  • ChromeDriver Tested with 2.24, 2.29
  • Chrome Web Browser compatible with the ChromeDriver version you downloaded. (Eg. ChromeDriver 2.29 supports Chrome v56-58) You can get this info from the ChromeDriver download page.

Installation

  1. Clone this repository. $ git clone https://github.com/zvovov/whatsapp-web.git
  2. Install selenium. $ sudo pip install selenium
  3. Download and extract ChromeDriver.zip
  4. Put path to ChromeDriver executable in the line 'chromedriver_path': '/path/to/chromedriver' in chat.py file of this repository.

Usage

Start Chatting

$ python chat.py <name>

  1. Replace <name> with the name of a contact or a group in your WhatsApp. Even partial names will work.
  2. Scan the QR code displayed on screen from the WhatsApp mobile app.
  3. Press y in console after WhatsApp Web is done loading.
  4. Chat. Chat. Chat.

Switch to another chat

sendto <name>

  1. Type it while chat.py is running.
  2. Replace <name> with the name of the contact/group you want to chat with now. Again, partial names will work.
  3. You can switch between chats as many times you want. Unread messages will be displayed to you every time.

Stop sending messages and only receive messages

stopsending

  1. Type it while chat.py is running.
  2. This will allow you to only see incoming messages. Your messages won't be sent. To send messages again, restart the script.

Configuration

In chat.py file:

config = {
    'chromedriver_path': '/path/to/chromedriver',
    'get_msg_interval': 5,  # Time (seconds). Recommended value: 5
    'colors': True,  # True/False. True prints colorful msgs in console
    ...
}
Parameter Use
'chromedriver_path' Path to the chromedriver executable on your system
'get_msg_interval' Time in seconds between each check for new incoming messages. Eg. 'get_msg_interval': 5 would check the active chat for any new messages every 5 seconds.
'colors' Boolean flag for coloured console output. If you want colorful messages in console, different colors for incoming and outgoing messages, set this to True. Otherwise, if you're seeing weird symbols like [92m, [0m around each message, set this to False.

Exit

Press Ctrl+C two times.

Disclaimer

Not affiliated with WhatsApp.

whatsapp-web's People

Contributors

matsbauer avatar zvovov avatar

Watchers

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