____  ___    _  _     _   _ _____     _______
 / ___|/ _ \  | || |   | | | |_ _\ \   / / ____|
| |  _| | | | | || |_  | |_| || | \ \ / /|  _|
| |_| | |_| | |__   _| |  _  || |  \ V / | |___
 \____|\___/     |_|   |_| |_|___|  \_/  |_____|

 --- A GOPHER-LIKE INTERFACE FOR HIVE BLOCKCHAIN ---

AUTOMATING WHATSAPP MESSAGES WITH PYTHON 馃槉

BY: @tkrypt | CREATED: June 23, 2022, 8:25 p.m. | VOTES: 45 | PAYOUT: $2.18 | [ VOTE ]

[IMAGE: https://files.peakd.com/file/peakd-hive/tkrypt/EobzLkmhT288WLfBxtEMd2qX5ZBUyuAwDsWCc5vig4V8GitGyHxXEFnsYDTVmg2nc4f.jpg]

Over the years, python has emerged as one of the most effectively vast programming languages and everyday people use it to do cool things like Automation, A.I and also to build our various applications and websites.

Thus, I've decided to be adventurous and play around with little things which include making a digital clock, Email-Automation as well as automating my WhatsApp messages with python.

In this article, I'd be sharing with you guys how I've been able to automate my WhatsApp messages with just two lines of python code.

A lo largo de los a帽os, Python se ha convertido en uno de los lenguajes de programaci贸n m谩s amplios y efectivos y la gente com煤n lo usa para hacer cosas geniales como automatizaci贸n, IA y tambi茅n para crear nuestras diversas aplicaciones y sitios web.

Por lo tanto, he decidido ser aventurero y jugar con peque帽as cosas que incluyen hacer un reloj digital, Automatizaci贸n de correo electr贸nico y automatizar mis mensajes de WhatsApp con python.

En este art铆culo, compartir茅 con ustedes c贸mo he podido automatizar mis mensajes de WhatsApp con solo dos l铆neas de c贸digo python.

https://images.hive.blog/0x0/https://images.hive.blog/DQmfDaSmTz3y8oavngRrr5mmVhrTXheYoEU4qhGUS7pq3xh/HiveDivider.png

WHATSAPP AUTOMATIONhttps://images.hive.blog/0x0/https://images.hive.blog/DQmfDaSmTz3y8oavngRrr5mmVhrTXheYoEU4qhGUS7pq3xh/HiveDivider.png

Automating WhatsApp comes with lots of advantages even though we have several applications that can automate our WhatsApp messages. There's a slight difference between automating WhatsApp messages with an external application or via WhatsApp itself and automating WhatsApp with python.

Automating your WhatsApp with python gives you the room to target your desired contact and a specific message you want them to receive as well as the time in which the message should be sent to them.

However, automating your WhatsApp with an external app most times would require a message from the group or contact itself upfront before sending a specified message to them and this isn't the contact targeted, for it sends the message to any group or contact that gives the required message.

So without further ado, let's get right into the tools needed for making WhatsApp automation via python code.

Tools for WhatsApp automation
- A laptop
- Installation of python if you haven't
- A code editor (preferably an IDE)
- Python module (Pywhatkit)
- An Internet connection
- A web browser (chrome, firefox, brave e.t.c..)
- And of course a WhatsApp account

Automatizar WhatsApp tiene muchas ventajas, aunque tenemos varias aplicaciones que pueden automatizar nuestros mensajes de WhatsApp. Hay una ligera diferencia entre automatizar los mensajes de WhatsApp con una aplicaci贸n externa o a trav茅s de WhatsApp y automatizar WhatsApp con python.

La automatizaci贸n de su WhatsApp con python le brinda la posibilidad de dirigirse a su contacto deseado y un mensaje espec铆fico que desea que reciban, as铆 como el momento en que se les debe enviar el mensaje.

Sin embargo, automatizar su WhatsApp con una aplicaci贸n externa la mayor铆a de las veces requerir铆a un mensaje del grupo o un contacto por adelantado antes de enviarles un mensaje espec铆fico y este no es el contacto objetivo, ya que env铆a el mensaje a cualquier grupo o contacto que da el mensaje requerido.

Entonces, sin m谩s pre谩mbulos, entremos directamente en las herramientas necesarias para hacer la automatizaci贸n de WhatsApp a trav茅s del c贸digo python.

Herramientas para la automatizaci贸n de WhatsApp
- Un ordenador port谩til
- Instalaci贸n de python si no lo has hecho
- Un editor de c贸digo (preferiblemente un IDE)
- M贸dulo Python (Pywhatkit)
- Una conexi贸n a Internet
- Un navegador web (Chrome, Firefox, Brave, etc.)
- Y por supuesto una cuenta de WhatsApp

https://images.hive.blog/0x0/https://images.hive.blog/DQmfDaSmTz3y8oavngRrr5mmVhrTXheYoEU4qhGUS7pq3xh/HiveDivider.png

STEPS TO AUTOMATEhttps://images.hive.blog/0x0/https://images.hive.blog/DQmfDaSmTz3y8oavngRrr5mmVhrTXheYoEU4qhGUS7pq3xh/HiveDivider.png

Open your pycharm or your preferred editor and create a python project

Abra su pycharm o su editor preferido y cree un proyecto de python

[IMAGE: https://files.peakd.com/file/peakd-hive/tkrypt/23wWTPyAE9D2CPsiDKbG9BuDDajU6taH48UBbDWKMRL3zWNXprcYrna1g7wndPHgqGNC9.jpg]

[IMAGE: https://files.peakd.com/file/peakd-hive/tkrypt/23t7AyUMHPupG5t4zvkoc1WDmfhJxeH1x8dgVkB3hgu3SWxr6VGGYte4XqQec2MG1Qrgq.jpg]

My project is named "Whatspyth". However, Ensure to select your project interpreter as your installed python version if you're just making the installation as shown in the image above.

After creating your project, you get a working space to write your python code.

Pywhatkit is one of the beautiful libraries with several features on python that allows us to automate our WhatsApp with just a few codes.

Thus, to install Pywhatkit ensure that your machine is connected to the internet. Go to Google and type "Pywhatkit" in the search box.

Mi proyecto se llama "Whatspyth". Sin embargo, aseg煤rese de seleccionar su int茅rprete de proyecto como su versi贸n de python instalada si solo est谩 realizando la instalaci贸n como se muestra en la imagen de arriba.

Despu茅s de crear su proyecto, obtiene un espacio de trabajo para escribir su c贸digo python.

Pywhatkit es una de las hermosas bibliotecas con varias funciones en python que nos permite automatizar nuestro WhatsApp con solo unos pocos c贸digos.

Por lo tanto, para instalar Pywhatkit, aseg煤rese de que su m谩quina est茅 conectada a Internet. Vaya a Google y escriba "Pywhatkit" en el cuadro de b煤squeda.

[IMAGE: https://files.peakd.com/file/peakd-hive/tkrypt/23swgX7S6qkXDn3qrpFgm2kGrGARyHy5N5rq5aNQf6gwsMoVFSLEMPyoZ46Ako4qmKjAb.jpg]

You then click on the first link which brings you to the page shown in the image below

Luego hace clic en el primer enlace que lo lleva a la p谩gina que se muestra en la imagen a continuaci贸n.

[IMAGE: https://files.peakd.com/file/peakd-hive/tkrypt/23zGeFpCb3EaMfRMVkpqR8jCXzPETa73gA8ACA68U4TSV9D2w5joxAcx9qe6ha3aav5jm.jpg]

Copy the text "pip install pywhatkit"

Copie el texto "pip install pywhatkit"

[IMAGE: https://files.peakd.com/file/peakd-hive/tkrypt/23tGVGGcNqEmyj5XLDAtzg786EqZDWigemv6ZUkdXfNfkbukpsqXy4RoQHqo9FdqC4TsK.jpg]

Then the module starts to download

Entonces el m贸dulo comienza a descargarse

[IMAGE: https://files.peakd.com/file/peakd-hive/tkrypt/23tGXuXk6xvPrvpCEz74WCFtHg6sKDDwjxAeWhZ2G34gm7THT8epCcNVfjZJrppmLFukC.jpg]

[IMAGE: https://files.peakd.com/file/peakd-hive/tkrypt/23tGXuXk6xvPrvpCEz74WCFtHg6sKDDwjxAeWhZ2G34gm7THT8epCcNVfjZJrppmLFukC.jpg]

This may take a few minutes depending on how strong your internet connection is.

You then get a successfully installed message which stipulates that our WhatsApp automation module is fully ready to be imported.

However, you may encounter a few bugs while trying to install your pywhatkit, here are a few tips you might wanna try to fix the installation errors;

Use "pip install pipwin" if this doesn't work too, try "pipwin install pywhatkit" if this doesn't work too then try "pip install pywhatkit --upgrade"

If any of the methods above still doesn't work, then you might wanna try upgrading your python.

However, if you were able to download the module successfully but feel adventurous trying to figure out where the module is being located on your machine, follow the steps in the image below.

Esto puede demorar unos minutos dependiendo de qu茅 tan fuerte sea su conexi贸n a Internet.

Luego recibe un mensaje de instalaci贸n exitosa que estipula que nuestro m贸dulo de automatizaci贸n de WhatsApp est谩 completamente listo para ser importado.

Sin embargo, es posible que encuentre algunos errores al intentar instalar su pywhatkit, aqu铆 hay algunos consejos que puede intentar corregir los errores de instalaci贸n;

Use "pip install pipwin" si esto tampoco funciona, intente "pipwin install pywhatkit" si esto tampoco funciona, intente "pip install pywhatkit --upgrade"

Si alguno de los m茅todos anteriores a煤n no funciona, es posible que desee intentar actualizar su python.

Sin embargo, si pudo descargar el m贸dulo con 茅xito pero se siente aventurero tratando de averiguar d贸nde se encuentra el m贸dulo en su m谩quina, siga los pasos en la imagen a continuaci贸n.

[IMAGE: https://files.peakd.com/file/peakd-hive/tkrypt/AJbkAvi1XYnXsFss9DA2Ms5HirXziySLXN9znVQ5GfSyPJ3xR2EsKst3RLhpSzD.jpg]

Also, ensure to link your WhatsApp to your browser via WhatsApp web if you haven't done that before now.

You import the module by typing "import pywhatkit" and then press Enter key to move to the next line.

You then type the code below to initiate the WhatsApp automation. Note that this is case sensitive which means your modules have to be typed in lower case.
pywhatkit.sendwhatsmsg("phone number", "message to be sent", hour, minutes)

Ensure your country code is well-typed before adding the phone number for there might be an error regarding the country code.

Also, the hour and minutes indicate the time in which you want the message to be sent to the receiver

In my own WhatsApp automation, I chose to send my message to my favourite hive mentor @starstrings01 for those of you who know him.

After you must have written the code correctly, go ahead and run the program.

Adem谩s, aseg煤rese de vincular su WhatsApp a su navegador a trav茅s de la web de WhatsApp si no lo ha hecho antes.

Importa el m贸dulo escribiendo "importar pywhatkit" y luego presiona la tecla Intro para pasar a la siguiente l铆nea.

Luego escriba el c贸digo a continuaci贸n para iniciar la automatizaci贸n de WhatsApp. Tenga en cuenta que esto distingue entre may煤sculas y min煤sculas, lo que significa que sus m贸dulos deben escribirse en min煤sculas.
pywhatkit.sendwhatsmsg("n煤mero de tel茅fono", "mensaje a enviar", hora, minutos)

Aseg煤rese de que el c贸digo de su pa铆s est茅 bien escrito antes de agregar el n煤mero de tel茅fono, ya que podr铆a haber un error con respecto al c贸digo de pa铆s.

Adem谩s, la hora y los minutos indican la hora en la que desea que se env铆e el mensaje al receptor.

En mi propia automatizaci贸n de WhatsApp, eleg铆 enviar mi mensaje a mi mentor de colmena favorito @starstrings01 para aquellos de ustedes que lo conocen.

Despu茅s de haber escrito el c贸digo correctamente, contin煤e y ejecute el programa.

[IMAGE: https://files.peakd.com/file/peakd-hive/tkrypt/23tGY4k8WordiUBuhuvZcNqykxtGi5mdFQVif6PqZdciS76M2fCoAwKXpTBZPwdhKQmVe.jpg]

[IMAGE: https://files.peakd.com/file/peakd-hive/tkrypt/23tbHF2pduc9cg2HQvZwyoja6LdB64hduaYBF432vVDBWSfd6EbuoNyCeA6xAyRBfTitv.jpg]

Hence, If you have been dying to try something like this out, you might wanna get your hands on it and try it out as this doesn't need a professionalism. You can send a birthday greetings message or other lovely greetings just with this cool technique.

IF YOU'VE GOT VALUE FROM THIS POST, KINDLY GIVE YOUR LOVELY COMMENTS. ALSO, UPVOTES AND REBLOGS WOULD BE MUCH APPRICIATED.

THANKS FOR READING 馃ぉ馃ぉ

Por lo tanto, si te has estado muriendo por probar algo como esto, es posible que quieras tenerlo en tus manos y probarlo, ya que esto no necesita profesionalismo. Puede enviar un mensaje de felicitaci贸n de cumplea帽os u otros saludos encantadores solo con esta t茅cnica genial.

SI USTED TIENE VALOR DE ESTA PUBLICACI脫N, POR FAVOR DAR SUS ENCANTADORES COMENTARIOS. TAMBI脡N, LOS UPVOTES Y REBLOGS SER脥AN MUY AGRADECIDOS.

GRACIAS POR LEER 馃ぉ馃ぉ

TAGS: [ #blog ] [ #hivenaija ] [ #palnet ] [ #ecotrain ] [ #sustainability ] [ #life ] [ #tech ] [ #geeks ] [ #programming ] [ #stem ]

Replies

@gwajnberg | June 24, 2022, 4:12 p.m. | Votes: 4 | [ VOTE ]

one question this library is compatible to the 2FA from whatsapp?
thanks for the tutorial
!1UP

@tkrypt | June 24, 2022, 4:34 p.m. | Votes: 5 | [ VOTE ]

You've got a nice question here champ.
This won't support an account with 2FA, I should have talked about it in the article but it escaped my mind.
There's a way you can bypass the 2FA with python but the test isn't written on pywhatkit.
Thanks for the review man

@curation-cartel | June 24, 2022, 4:15 p.m. | Votes: 0 | [ VOTE ]

[IMAGE: https://files.peakd.com/file/peakd-hive/curation-cartel/23wMSHS7KDhm8uawiwjoGnBrPgtNgz8j7dYaAPivVRYj3HcZYR4vwDHhKUwqJUDq8ezxr.png] |
You have received a 1UP from @gwajnberg! The @oneup-cartel will soon upvote you with:
@stem-curator, @pal-curator
And they will bring !PIZZA 馃崟, !PGM 馃幃 and !LOLZ 馃ぃ
-|-

Learn more about our delegation service to earn daily rewards. Join the Cartel on Discord.

@hivebuzz | June 25, 2022, 8:33 a.m. | Votes: 0 | [ VOTE ]

Congratulations @tkrypt! You have completed the following achievement on the Hive blockchain and have been rewarded with new badge(s):

You made more than 100 comments.Your next target is to reach 200 comments.

You can view your badges on your board and compare yourself to others in the Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP

[ BACK TO TRENDING ] [ BACK TO MENU ]
CMD>