Giter Site home page Giter Site logo

iamwarning / simple-whatsapp-automation Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 61 KB

Simple script to automate the sending of messages by Whatsapp using Python

License: MIT License

Python 100.00%
whatsapp whatsapp-web whatsapp-bot selenium selenium-webdriver selenium-python python3 script automation scripts

simple-whatsapp-automation's Introduction

Whatsapp Automation

Installation

To run the script, you must first have Selenium installed.

Open the terminal and run the following command:

pip install selenium

Plugins

After installing Selenium, a webdriver is required to be able to perform the automation tests in our preferred browser. Once the driver corresponding to the browser that we will use is downloaded, we proceed to save it in the path where our python script is located. Before executing the script, we must first change the target that would be the name of the contact to whom we want to send a message, then we modify the string that is the message we will send.

#Path where the webdriver is located
browser = webdriver.Chrome("/home/baos/Documents/Python/WhatsApp Automation/./chromedriver")

target = '" _user_ "' #Contact name
string = " _message_ " #Custom message  
x_arg = '//span[contains(@title, ' + target + ')]'
target = wait.until(ec.presence_of_element_located((By.XPATH, x_arg)))
target.click()

PD: The script is made to work with Chrome in version 81. The links of the browsers with which automation can be performed are attached.

Browser Driver
Chrome Webdriver
Mozilla Webdriver
Safari Webdriver

Made the changes, we simply have to execute in the terminal the command:

python3 Whatsapp.py 

It will open a browser window and show the WhatsApp page. We scan the qr code with our mobile device to be able to access the messages and we simply observe the magic.

License

MIT

simple-whatsapp-automation's People

Contributors

dependabot[bot] avatar iamwarning avatar pawahtun avatar renovate[bot] avatar

Watchers

 avatar  avatar

simple-whatsapp-automation's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • Update dependency idna to v3.6
  • Update github/codeql-action action to v3
  • ๐Ÿ” Create all rate-limited PRs at once ๐Ÿ”

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/codeql.yml
  • actions/checkout v4@8ade135a41bc03ea155e62e844d188df1ea18608
  • github/codeql-action v2
  • github/codeql-action v2
  • github/codeql-action v2
pip_requirements
requirements.txt
  • certifi ==2023.7.22
  • charset-normalizer ==3.2.0
  • colorama ==0.4.6
  • idna ==3.4
  • packaging ==23.1
  • python-dotenv ==1.0.0
  • requests ==2.31.0
  • tqdm ==4.66.1
  • urllib3 ==2.0.4
  • webdriver-manager ==4.0.0
  • pip ==23.2.1
  • wheel ==0.41.2
  • setuptools ==68.2.2
  • selenium ~=4.12.0

  • Check this box to trigger a request for Renovate to run again on this repository

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.