网创优客建站品牌官网
为成都网站建设公司企业提供高品质网站建设
热线:028-86922220
成都专业网站建设公司

定制建站费用3500元

符合中小企业对网站设计、功能常规化式的企业展示型网站建设

成都品牌网站建设

品牌网站建设费用6000元

本套餐主要针对企业品牌型网站、中高端设计、前端互动体验...

成都商城网站建设

商城网站建设费用8000元

商城网站建设因基本功能的需求不同费用上面也有很大的差别...

成都微信网站建设

手机微信网站建站3000元

手机微信网站开发、微信官网、微信商城网站...

建站知识

当前位置:首页 > 建站知识

手机群发短信脚本python

首先电脑上安装好adb工具包,然后手机usb接上电脑,需要打开调试模式
然后准备好一个表格,表格里准备好需要群发的手机号码

成都创新互联公司专注于企业网络营销推广、网站重做改版、易门网站定制设计、自适应品牌网站建设、H5开发商城系统网站开发、集团公司官网建设、外贸营销网站建设、高端网站制作、响应式网页设计等建站业务,价格优惠性价比高,为易门等各大城市提供网站开发制作服务。

import os 
import pandas as pd 
import numpy as np 
import time
#群发短信,50个号码一发,读取表格中手机号,列名写“手机号”

content="短信内容"
mobiles=""
df = pd.read_excel('mobiles.xlsx')
#遍历表格,读取手机号
for index,row in df.iterrows():
    if index==len(df)-1:
        mobiles=mobiles+str(row['手机号'])
        os.popen("adb shell am start -a android.intent.action.SENDTO -d sms:{} --es sms_body {}".format(mobiles,content))
        time.sleep(2)
        #模拟发送
        os.popen("adb shell input keyevent 22")
        time.sleep(1)
        os.popen("adb shell input keyevent 66")
        time.sleep(120)
        os.popen("adb shell input keyevent 3")
    elif index % 50==0 and index!=0:

        mobiles=mobiles+str(row['手机号'])
        #打开短信,编辑短信
        os.popen("adb shell am start -a android.intent.action.SENDTO -d sms:{} --es sms_body {}".format(mobiles,content))
        time.sleep(2)
        #模拟发送
        os.popen("adb shell input keyevent 22")
        time.sleep(1)
        os.popen("adb shell input keyevent 66")
        time.sleep(120)
        os.popen("adb shell input keyevent 3")
        mobiles=""
    else:
        mobiles=mobiles+str(row['手机号'])+','

文章标题:手机群发短信脚本python
网页链接:http://bjjierui.cn/article/pcohep.html

其他资讯