手機群發(fā)短信腳本python

首先電腦上安裝好adb工具包,然后手機usb接上電腦,需要打開調(diào)試模式
然后準(zhǔn)備好一個表格,表格里準(zhǔn)備好需要群發(fā)的手機號碼

成都創(chuàng)新互聯(lián)公司專注于企業(yè)網(wǎng)絡(luò)營銷推廣、網(wǎng)站重做改版、易門網(wǎng)站定制設(shè)計、自適應(yīng)品牌網(wǎng)站建設(shè)、H5開發(fā)、商城系統(tǒng)網(wǎng)站開發(fā)、集團公司官網(wǎng)建設(shè)、外貿(mào)營銷網(wǎng)站建設(shè)、高端網(wǎng)站制作、響應(yīng)式網(wǎng)頁設(shè)計等建站業(yè)務(wù),價格優(yōu)惠性價比高,為易門等各大城市提供網(wǎng)站開發(fā)制作服務(wù)。

import os 
import pandas as pd 
import numpy as np 
import time
#群發(fā)短信,50個號碼一發(fā),讀取表格中手機號,列名寫“手機號”

content="短信內(nèi)容"
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)
        #模擬發(fā)送
        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)
        #模擬發(fā)送
        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['手機號'])+','

新聞標(biāo)題:手機群發(fā)短信腳本python
網(wǎng)站路徑:http://bm7419.com/article48/pcohep.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供建站公司、定制開發(fā)、網(wǎng)站設(shè)計公司響應(yīng)式網(wǎng)站、網(wǎng)站導(dǎo)航網(wǎng)站制作

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)

商城網(wǎng)站建設(shè)