本文主要是介绍使用python玩微信—wechat_py,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
使用python玩微信
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Date : 2018-02-26 08:12:39
# @Author : guanglinzhou (xdzgl812@163.com)import os
import itchat
import matplotlib.pyplot as plt
from collections import Counter
from matplotlib.font_manager import FontManager, FontProperties# 登录微信
itchat.auto_login(hotReload=True)
friends = itchat.get_friends(update=True)# print(friends[0])
Getting uuid of QR code.
Downloading QR code.
Please scan the QR code to log in.
Please press confirm on your phone.
Loading the contact, this may take a little while.
Login successfully as 腾原
利用itchat.send()向某个UserName发送消息
itchat.send(u'https://zhuanlan.zhihu.com/p/26514576','filehelper')
<ItchatReturnValue: {'BaseResponse': {'Ret': 0, 'ErrMsg': '请求成功', 'RawMsg': '请求成功'}, 'MsgID': '1783539302
这篇关于使用python玩微信—wechat_py的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!