鏈接:/question/51160419/答案/124460961。
來源:知乎。
版權歸作者所有,授權請聯系作者。
普通網頁點擊:
1.建議通過瀏覽器或Wireshark分析消息交互。
2.之後,它被請求模擬。
由於沒有具體的網址,具體的代碼我也給不了。
具體問題發微信官方賬號:
1.建議使用Python的微信API(pip install itchat)。
2.由於沒有Python版本,這裏我給出壹個兼容的解決方案。
#編碼=utf8
導入線程
導入itchat
SIGN_IN_MP_DICT = {
u '學校微信微信官方賬號':u '學校登錄密碼',
u '公司微信微信官方賬號':u '公司登錄密碼'。
def get_day(時間間隔):
return int(time . strftime(' % y % m % d ',time . local time(time . time()+time gap)))
下壹個簽名日期=獲取日期(60*60*24)
def登錄線程():
''登錄線程
如果簽到日期還沒到,繼續循環。
如果到了簽到的時間,完成兩個微信官方賬號的簽到,更新日期。
'''
而1:
if get _ day & lt下壹個簽名日期:
時間.睡眠(30)
否則:
對於SIGN_IN_MP_DICT.items()中的k,v:
itchat.send(msg=v,
toUserName = it chat . search _ MPs(name = k)[0][' UserName '])
下壹個簽名日期=獲取日期(60*60*24)
itchat.auto_login(True)
#測試特定的微信官方賬號是否存在。
對於SIGN_IN_MP_DICT.keys()中的mpName:
mpList = it chat . search _ MPs(name = MP name)
if len(mpList)!= 1:
打印(u '微信官方賬號“%s”未檢測到,請檢查名稱)。
破裂
否則:
signInThread =線程。線程(target =登錄線程)
signInThread.setDaemon(True)
signInThread.start()
itchat.run()