from __future__ import unicode_literals
from threading import Timer
from wxpy import *
import requests
bot = Bot()
def send_news():try:my_friend = bot.friends().search(u'洋')[0]# 好友的微信号my_friend.send(u"知道吗,你是最最最最美的女孩纸!")t = Timer(1,send_news)# 设置发送时间间隔t.start()except:my_friend = bot.friends().search('Jazmin')[0]# 自己的微信号my_friend.send(u"今天消息发送失败了")
if __name__ == "__main__":send_news()