So, you have a list of contacts who you need to send Whatsapp messages to and the number of contacts is about 50–100. To top it all of you have to send them a message which specifically addresses them.
因此,您有需要向其发送Whatsapp消息的联系人列表,并且联系人数量约为50–100 。 最重要的是,所有人都必须向他们发送一条专门针对他们的消息。
Really becomes difficult when you can’t even use the broadcast feature doesn’t it?
当您甚至无法使用广播功能时,真的变得很困难,不是吗?
Well, the good news is there is a way to automate this using python.
好消息是,有一种方法可以使用python自动执行此操作。
Want to know how?
想知道吗?
All you need is a laptop, an internet connection, an IDE to run python on and a cup of coffee :)
您所需要的只是一台笔记本电脑,互联网连接,运行python的IDE和一杯咖啡:)
Prerequisites
先决条件
You will need selenium and pandas installed. You will also need chrome webdriver downloaded. Download the one relevant for your OS.
您将需要安装Selenium和熊猫 。 您还需要下载chrome webdriver 。 下载与您的操作系统相关的一种。
Now you have all of them installed. The next bit is to import using our IDE.
现在,您已经安装了所有这些。 下一步是使用我们的IDE进行导入。
I personally use Pycharm
我个人使用Pycharm
from selenium import webdriver
import time
from selenium.webdriver.common.by import By
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.keys import Keys
import itertools
import pandas as pd
If the above portion is a bit confusing. Don’t worry as we go along in the code you will understand it with ease.
如果以上部分有点混乱。 不用担心&