qzzhou

代码如下:

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(\'执愛。婷^_^\')[0]# 自己的微信号
        my_friend.send(u"今天消息发送失败了")    #描述自己修改
if __name__ == "__main__":
    send_news()

 

分类:

技术点:

相关文章:

  • 2021-12-05
  • 2022-12-23
  • 2022-01-20
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-12-12
  • 2021-12-12
  • 2022-12-23
  • 2021-11-24
  • 2022-12-23
  • 2021-12-05
相关资源
相似解决方案