# @Author : ATIME # @License : GNU General Public License # @Contact : [email protected] # @Time : 2017/12/24 16:16 # @File : GSM_WeChat.py # @Version : Python2.7.14 # @Version : Python2.7.14 import itchat import threading import ul_gsm as gsm from sim800al import Sim800al from instapush import Instapush, App app = App(appid='5a387736a4c48a6e16fc3061', secret='a3aad896c2f71175cb64b6f515bd7624') app.add_event(event_name='newmessage', trackers=['email'], message='{email} 收到新信息') def WechatSend(): @itchat.msg_register(itchat.content.TEXT) def print_content(msg): # print(msg['Text']) # print(msg['FromUserName']) itchat.send(msg['Text'] + msg['FromUserName'], 'filehelper') # itchat.send(msg['Text'], msg['FromUserName']) # itchat.send('hhhhh', 'filehelper') itchat.auto_login(hotReload=True) itchat.run()
#!/usr/bin/env python # -*- coding:utf-8 -*- # @Author : ATIME # @License : GNU General Public License # @Contact : [email protected] # @Time : 2017/12/19 10:33 # @File : push.py # @Version : Python2.7.14 from instapush import Instapush, App # insta = Instapush(user_token='xxxxxxx') # # insta.list_app() #List all apps # # insta.add_app(title='title') #Create a app named title app = App(appid='5a387736a4c48a6e16fc3061', secret='a3aad896c2f71175cb64b6f515bd7624') print(app.list_event()) app.add_event(event_name='signups', trackers=['email'], message='{email} hia hia hia') app.notify(event_name='signups', trackers={'email': '*****@*****.**'})