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.
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.
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
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
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
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.
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.
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.
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.
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.
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.
IF YOU'VE GOT VALUE FROM THIS POST, KINDLY GIVE YOUR LOVELY COMMENTS. ALSO, UPVOTES AND REBLOGS WOULD BE MUCH APPRICIATED.
THANKS FOR READING 🤩🤩
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 🤩🤩