使用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