python实现微信接口——itchat模块

安装

pip install itchat

登录

itchat.auto_login() # 这种方法将会通过微信扫描二维码登录,但是这种登录的方式确实短时间的登录,并不会保留登录的状态,也就是下次登录时还是需要扫描二维码
加入 hotReload==True # 那么就会保留登录的状态,至少在后面的几次登录过程中不会再次扫描二维码,该参数生成一个静态文件itchat.pkl用于存储登录状态

退出及登录完成后调用的特定的方法

这里主要使用的是灰调函数的方法,登录完成后的方法需要赋值在 loginCallback 中退出后的方法,需要赋值在 exitCallback 中.若不设置 loginCallback 的值, 将会自动删除二维码图片并清空命令行显示.

import itchat, time
def lc():print("Finash Login!")
def ec():print("exit")itchat.auto_login(loginCallback=lc, exitCallback=ec)
time.sleep()
itchat.logout()    #强制退出登录    

回复消息

send

  • send(msg="Text Message", toUserName=None)

参数:

  • msg : 文本消息内容

  • @fil@path_to_file : 发送文件

  • @img@path_to_img : 发送图片

  • @vid@path_to_video : 发送视频

  • toUserName : 发送对象, 如果留空, 将发送给自己.

返回值

  • True or False

实例代码

# coding-utf-8
import itchat
itchat.auto_login()
itchat.send("Hello World!")
ithcat.send("@fil@%s" % '/tmp/test.text')
ithcat.send("@img@%s" % '/tmp/test.png')
ithcat.send("@vid@%s" % '/tmp/test.mkv')

send_msg

  • send_msg(msg='Text Message', toUserName=None),其中的的msg是要发送的文本,toUserName是发送对象, 如果留空, 将发送给自己,返回值为True或者False

实例代码

import itchat
itchat.auto_login()
itchat.send_msg("hello world.")

send_file

  • send_file(fileDir, toUserName=None) fileDir是文件路径, 当文件不存在时, 将打印无此文件的提醒,返回值为True或者False

实例代码

mport itchatitchat.auto_login()
itchat.send_file("/tmp/test.txt")

send_image

  • send_image(fileDir, toUserName=None) 参数同上

实例代码

import itchatitchat.auto_login()
itchat.send_img("/tmp/test.txt")

send_video

  • send_video(fileDir, toUserName=None) 参数同上

实例代码

import itchatitchat.auto_login()
itchat.send_video("/tmp/test.txt")

注册消息方法

itchat 将根据接受到的消息类型寻找对应的已注册的方法. 如果一个消息类型没有对应的注册方法, 该消息将会被舍弃. 在运行过程中也可以动态注册方法, 注册方式与结果不变.

注册方法

  • 不带具体对象注册, 将注册为普通消息的回复方法.

import itchat
from itchat.content import *
@itchat.msg_register(TEXT)   #这里的TEXT表示如果有人发送文本消息,那么就会调用下面的方法
def simple_reply(msg):#这个是向发送者发送消息itchat.send_msg('已经收到了文本消息,消息内容为%s'%msg['Text'],toUserName=msg['FromUserName'])return "T reveived: %s" % msg["Text"]     #返回的给对方的消息,msg["Text"]表示消息的内容

  • 带对象参数注册, 对应消息对象将调用该方法,其中isFriendChat表示好友之间,isGroupChat表示群聊,isMapChat表示公众号

import itchat
from itchat.content import *@itchat.msg_register(TEXT, isFriendChat=True, isGroupChat=True,isMpChat=True)
def text_reply(msg):msg.user.send("%s : %s" % (mst.type, msg.text))

  • 消息类型 向注册方法传入的 msg 包含微信返回的字典的所有内容.itchat 增加 Text, Type(也就是参数) 键值, 方便操作.

itcaht.content 中包含所有的消息类型参数, 如下表

参数 l类型 Text 键值
TEXT 文本 文本内容(文字消息)
MAP 地图 位置文本(位置分享)
CARD 名片 推荐人字典(推荐人的名片)
SHARING 分享 分享名称(分享的音乐或者文章等)
PICTURE 下载方法   图片/表情
RECORDING 语音 下载方法
ATTACHMENT 附件 下载方法
VIDEO 小视频 下载方法
FRIENDS 好友邀请 添加好友所需参数
SYSTEM 系统消息 更新内容的用户或群聊的UserName组成的列表
NOTE 通知 通知文本(消息撤回等)

附件的下载与发送

itchat 的附件下载方法存储在 msgText 键中. 发送的文件名(图片给出的默认文件名), 都存储在 msgFileName 键中. 下载方法, 接受一个可用的位置参数(包括文件名), 并将文件响应的存储. 注意:下载的文件存储在指定的文件中,直接将路径与FileName连接即可,如msg["Text"]('/tmp/weichat'+msg['FileName'])

@itchat.msg_register([PICTURE, RECORDING, ATTACHMENT, VIDEO])
def download_files(msg):#msg.download(msg['FileName'])   #这个同样是下载文件的方式msg['Text'](msg['FileName'])      #下载文件#将下载的文件发送给发送者itchat.send('@%s@%s' % ('img' if msg['Type'] == 'Picture' else 'fil', msg["FileName"]), msg["FromUserName"])

群消息

增加了三个键值,如下:

  • isAt 判断是否 @ 本号

  • ActualNickName : 实际 NickName(昵称)

  • Content : 实际 Content

测试程序

import itcaht
from itchat.content import TEXT@itchat.msg_register(TEXT, isGroupChat=True)
def text_reply(msg):if(msg.isAt):    #判断是否有人@自己#如果有人@自己,就发一个消息告诉对方我已经收到了信息itchat.send_msg("我已经收到了来自{0}的消息,实际内容为{1}".format(msg['ActualNickName'],msg['Text']),toUserName=msg['FromUserName'])itchat.auto_login()
itchat.run()

注册消息的优先级

总的来说就是后面注册同种类型的消息会覆盖之前注册的消息,详情见文档https://itchat.readthedocs.io/zh/latest/

消息内容

注意:所有的消息内容都是可以用键值对来访问的,如msg["FromUserName]就是查看发送者,itchat.search_friends(userName=msg['FromUserName'])['NickName']查看的是当发送者昵称

一般消息

一般的消息都遵循以下的内容:

{"FromUserName": "","ToUserName": "","Content": "","StatusNotifyUserName": "","ImgWidth": 0,"PlayLength": 0,"RecommendInfo": {},"StatusNotifyCode": 0,"NewMsgId": "","Status": 0,"VoiceLength": 0,"ForwardFlag": 0,"AppMsgType": 0,"Ticket": "","AppInfo": {},"Url": "","ImgStatus": 0,"MsgType": 0,"ImgHeight": 0,"MediaId": "","MsgId": "","FileName": "","HasProductId": 0,"FileSize": "","CreateTime": 0,"SubMsgType": 0
}

初始化消息

 MsgType: 51FromUserName: 自己IDToUserName: 自己IDStatusNotifyUserName: 最近联系的联系人IDContent:<msg><op id='4'><username># 最近联系的联系人
                    filehelper,xxx@chatroom,wxid_xxx,xxx,...</username><unreadchatlist><chat><username># 朋友圈
                            MomentsUnreadMsgStatus</username><lastreadtime>1454502365</lastreadtime></chat></unreadchatlist><unreadfunctionlist># 未读的功能账号消息,群发助手,漂流瓶等</unreadfunctionlist></op></msg>

文本消息

MsgType: 1FromUserName: 发送方IDToUserName: 接收方IDContent: 消息内容

图片消息

itchat 增加了 Text 键, 键值为 下载该图片的方法.

MsgType: 3FromUserName: 发送方IDToUserName: 接收方IDMsgId: 用于获取图片,用于表示每一条消息Content:<msg><img length="6503" hdlength="0" /><commenturl></commenturl></msg>

拓展:如果想要得到Content中的具体内容可以使用正则表达式匹配出来

视频消息

*itchat 增加了 Text 键, 键值为 下载该视频的方法.*

    MsgType: 62FromUserName: 发送方IDToUserName: 接收方IDMsgId: 用于获取小视频Content:<msg><img length="6503" hdlength="0" /><commenturl></commenturl></msg>

地理位置消息

itchat 增加了 Text 键, 键值为 该地点的文本形式.

MsgType: 1FromUserName: 发送方IDToUserName: 接收方IDContent: http://weixin.qq.com/cgi-bin/redirectforward?args=xxxOriContent:<?xml version="1.0"?>
<msg><location x="34.195278" y="117.177803" scale="16" label="江苏省徐州市铜山区新区海河路" maptype="0" poiname="江苏师范大学大学生公寓园区" />
</msg>

名片消息

itchat 增加了Text 键, 键值为 该调用 add_friend 需要的属性.

 MsgType: 42FromUserName: 发送方IDToUserName: 接收方IDContent:<?xml version="1.0"?><msg bigheadimgurl="" smallheadimgurl="" username="" nickname=""  shortpy="" alias="" imagestatus="3" scene="17" province="" city="" sign="" sex="1" certflag="0" certinfo="" brandIconUrl="" brandHomeUrl="" brandSubscriptConfigUrl="" brandFlags="0" regionCode="" />RecommendInfo:{"UserName": "xxx", # ID,这里的是昵称"Province": "xxx",   "City": "xxx",    "Scene": 17, "QQNum": 0, "Content": "", "Alias": "xxx", # 微信号"OpCode": 0, "Signature": "", "Ticket": "", "Sex": 0, # 1:男, 2:女"NickName": "xxx", # 昵称"AttrStatus": 4293221, "VerifyFlag": 0}

下面是添加好友的测试代码

@itchat.msg_register(itchat.content.CARD,isFriendChat=True)
def simply(msg):print msg['Text']print msg['Content']itchat.add_friend(userName=msg['Text']['UserName'])  #添加推荐的好友print msg['RecommendInfo']print msg['RecommendInfo']['UserName']

语音消息

*itchat增加了Text键,键值为下载该语音文件的方法,下载下来的是MP3的格式

MsgType: 34FromUserName: 发送方IDToUserName: 接收方IDMsgId: 用于获取语音Content:<msg><voicemsg endflag="1" cancelflag="0" forwardflag="0" voiceformat="4" voicelength="1580" length="2026" bufid="216825389722501519" clientmsgid="49efec63a9774a65a932a4e5fcd4e923filehelper174_1454602489" fromusername="" /></msg>

下载方法:msg['Text'](msg['FileName'])

动画表情

itchat添加了Text键,键值为下载该图片表情的方法。 注意:本人亲测对于一些微信商店提供的表情是不能下载成功的,这里的自带的表情emoji是属于TEXT类别的,因此如果将其注册为PICTURE消息类型的话是不可以监测到的

  MsgType: 47FromUserName: 发送方IDToUserName: 接收方IDContent:<msg><emoji fromusername = "" tousername = "" type="2" idbuffer="media:0_0" md5="e68363487d8f0519c4e1047de403b2e7" len = "86235" productid="com.tencent.xin.emoticon.bilibili" androidmd5="e68363487d8f0519c4e1047de403b2e7" androidlen="86235" s60v3md5 = "e68363487d8f0519c4e1047de403b2e7" s60v3len="86235" s60v5md5 = "e68363487d8f0519c4e1047de403b2e7" s60v5len="86235" cdnurl = "http://emoji.qpic.cn/wx_emoji/eFygWtxcoMF8M0oCCsksMA0gplXAFQNpiaqsmOicbXl1OC4Tyx18SGsQ/" designerid = "" thumburl = "http://mmbiz.qpic.cn/mmemoticon/dx4Y70y9XctRJf6tKsy7FwWosxd4DAtItSfhKS0Czr56A70p8U5O8g/0" encrypturl = "http://emoji.qpic.cn/wx_emoji/UyYVK8GMlq5VnJ56a4GkKHAiaC266Y0me0KtW6JN2FAZcXiaFKccRevA/" aeskey= "a911cc2ec96ddb781b5ca85d24143642" ></emoji> <gameext type="0" content="0" ></gameext></msg>

普通链接或应用分享消息

主要针对的是分享的文章等等

    MsgType: 49AppMsgType: 5FromUserName: 发送方IDToUserName: 接收方IDUrl: 链接地址FileName: 链接标题Content:<msg><appmsg appid=""  sdkver="0"><title></title><des></des><type>5</type><content></content><url></url><thumburl></thumburl>...</appmsg><appinfo><version></version><appname></appname></appinfo></msg>

音乐链接消息

主要针对的是音乐

MsgType: 49AppMsgType: 3FromUserName: 发送方IDToUserName: 接收方IDUrl: 链接地址FileName: 音乐名AppInfo: # 分享链接的应用{Type: 0, AppID: wx485a97c844086dc9}Content:<msg><appmsg appid="wx485a97c844086dc9"  sdkver="0"><title></title><des></des><action></action><type>3</type><showtype>0</showtype><mediatagname></mediatagname><messageext></messageext><messageaction></messageaction><content></content><contentattr>0</contentattr><url></url><lowurl></lowurl><dataurl>http://ws.stream.qqmusic.qq.com/C100003i9hMt1bgui0.m4a?vkey=6867EF99F3684&amp;guid=ffffffffc104ea2964a111cf3ff3edaf&amp;fromtag=46</dataurl><lowdataurl>http://ws.stream.qqmusic.qq.com/C100003i9hMt1bgui0.m4a?vkey=6867EF99F3684&amp;guid=ffffffffc104ea2964a111cf3ff3edaf&amp;fromtag=46</lowdataurl><appattach><totallen>0</totallen><attachid></attachid><emoticonmd5></emoticonmd5><fileext></fileext></appattach><extinfo></extinfo><sourceusername></sourceusername><sourcedisplayname></sourcedisplayname><commenturl></commenturl><thumburl>http://imgcache.qq.com/music/photo/album/63/180_albumpic_143163_0.jpg</thumburl><md5></md5></appmsg><fromusername></fromusername><scene>0</scene><appinfo><version>29</version><appname>摇一摇搜歌</appname></appinfo><commenturl></commenturl></msg> 

群消息

itchat 增加了三个群聊相关的键值:

  • isAt : 判断是否 @ 本号

  • ActualNickName : 实际 NickName

  • Content : 实际 Content

MsgType: 1
FromUserName: @@xxx
ToUserName: @xxx
Content:@xxx:<br/>xxx

红包消息

 MsgType: 49AppMsgType: 2001FromUserName: 发送方IDToUserName: 接收方IDContent: 未知

系统消息

 MsgType: 10000FromUserName: 发送方IDToUserName: 自己IDContent:"你已添加了 xxx ,现在可以开始聊天了。""如果陌生人主动添加你为朋友,请谨慎核实对方身份。""收到红包,请在手机上查看"

账号类型

tchat 为三种账号都提供了 整体获取方法与搜索方法.

好友

get_friends

  • itchat.get_friends() 返回完整的好友列表

  • 每个好友为一个字典, 其中第一项为本人的账号信息;

  • 传入 update=True, 将更新好友列表并返回, get_friends(update=True)

search_friends

  • itchat.get_friends() 好友搜索,有以下四种方式

  • 仅获取自己的用户信息

# 获取自己的用户信息,返回自己的属性字典
itchat.search_friends()

  • 获取特定 UserName 的用户信息

# 获取特定UserName的用户信息
itchat.search_friends(userName='@abcdefg1234567') ## 获取发送信息的好友的详细信息
@itchat.msg_register(itchat.content.TEXT,isFriendChat=True)
def reply(msg):print msg['FromUserName']print itchat.search_friends(userName=msg['FromUserName'])   #详细信息print itchat.search_friends(userName=msg['FromUserName'])['NickName']   #获取昵称

  • 获取备注,微信号, 昵称中的任何一项等于name键值的用户. (可以与下一项配置使用.)

比如在我的微信中有一个备注为autolife的人,我可以使用这个方法搜索出详细的信息

# 获取任何一项等于name键值的用户
itchat.search_friends(name='autolife')

  • 获取备注,微信号, 昵称分别等于相应键值的用户. (可以与上一项配置使用.)

# 获取分别对应相应键值的用户
itchat.search_friends(wechatAccount='littlecodersh')
# 三、四项功能可以一同使用
itchat.search_friends(name='LittleCoder机器人', wechatAccount='littlecodersh')

update_friend

主要用于好友更新

  • 特定用户: 传入用户UserName, 返回指定用户的最新信息.

  • 用户列表: 传入 UserName 组成的列表, 返回用户最新信息组成的列表

memberList = itchat.update_friend('@abcdefg1234567')

公众号

get_mps

将返回完整的工作号列表

  • 每个公众号为一个字典,

  • 传入 update=True 将更新公众号列表, 并返回.

search_mps

  • 获取特定UserName的公众号

# 获取特定UserName的公众号,返回值为一个字典
itchat.search_mps(userName='@abcdefg1234567')

  • 获取名字中还有特定字符的公众号.

# 获取名字中含有特定字符的公众号,返回值为一个字典的列表
itchat.search_mps(name='LittleCoder')

  • 当两项都是勇士, 将仅返回特定UserName的公众号.

群聊

  • get_chatrooms : 返回完整的群聊列表.

  • search_chatrooms : 群聊搜索.

  • update_chatroom : 获取群聊用户列表或更新该群聊.

  • 群聊在首次获取中不会获取群聊的用户列表, 所以需要调用该命令才能获取群聊成员.

  • 传入群聊的 UserName , 返回特定群聊的详细信息.

  • 传入UserName组成的列表, 返回指定用户的最新信息组成的列表.

memberList = itchat.update_chatroom('@@abcdefg1234567', detailedMember=True)

  • 创建群聊,增加/删除群聊用户:

  • 由于之前通过群聊检测是否被好友拉黑的程序, 目前这三个方法都被严格限制了使用频率.

  • 删除群聊需要本账号为管理员, 否则无效.

  • 将用户加入群聊有直接加入与发送邀请, 通过 useInvitation 设置.

  • 超过 40 人的群聊无法使用直接加入的加入方式.

memberList = itchat.get_frients()[1:]
# 创建群聊, topic 键值为群聊名称.
chatroomUserName = itchat.create_chatroom(memberList, "test chatroom")
# 删除群聊内的用户
itchat.delete_member_from_chatroom(chatroomUserName, memberList[0])
# 增加用户进入群聊.
itchat.add_member_into_chatroom(chatroomUserName, memberList[0], useInvitation=False)

方法汇总

itchat.add_friend
itchat.new_instance
itchat.add_member_into_chatroom
itchat.originInstance
itchat.auto_login
itchat.returnvalues
itchat.check_login
itchat.run
itchat.components
itchat.search_chatrooms
itchat.config
itchat.search_friends
itchat.configured_reply
itchat.search_mps
itchat.content
itchat.send
itchat.core
itchat.send_file
itchat.Core
itchat.send_image
itchat.create_chatroom
itchat.send_msg
itchat.delete_member_from_chatroom
itchat.send_raw_msg
itchat.dump_login_status
itchat.send_video
itchat.get_chatrooms
itchat.set_alias
itchat.get_contact
itchat.set_chatroom_name
itchat.get_friends
itchat.set_logging
itchat.get_head_img
itchat.set_pinned
itchat.get_mps
itchat.show_mobile_login
itchat.get_msg
itchat.start_receiving
itchat.get_QR
itchat.storage
itchat.get_QRuuid
itchat.update_chatroom
itchat.instanceList
itchat.update_friend
itchat.load_login_status
itchat.upload_file
itchat.log
itchat.utils
itchat.login
itchat.VERSION
itchat.logout
itchat.web_init
itchat.msg_register

案列演示

  有几个小案例,感觉挺有意思的!!!

微信好友信息轰炸

import itchat
import timeprint("请扫描二维码")
# 热登录,登录网页版微信
# 这样会生成一个 itchat.pkl 文件,用于保持登录状态,有点类似于cookie
itchat.auto_login(hotReload=True)
friend_name = input("请输入要发送人的备注!-----")
content = input("输入内容,按回车键------")
# 先通过微信的备注名找到微信好友备注信息
# UserName  通过其定位到好友
boom_obj = itchat.search_friends(remarkName=friend_name)[0]['UserName']
# 死循环
while True:# 睡一会,否则被屏蔽time.sleep(0.5)print('正在轰炸。。。')# 发送itchat.send_msg(msg=content, toUserName=boom_obj)

   注意 : 微信的好友名字必须是备注名,否则查询不到!!!

微信群刷屏

import itchatitchat.auto_login(hotReload=True)
def send_group(msg, gname):rooms = itchat.get_chatrooms(update=True)rooms = itchat.search_chatrooms(gname)if rooms is not None:for i in range(2):username = rooms[0]["UserName"]itchat.send(msg, toUserName=username)else:print("输入错误指令,请重新输入!!!")if __name__ == '__main__':send_group('早上好','134.平凡玛法数据群')

使用饼图展示微信好友性别统计

import itchatfrom echarts import Echart, Legend, Pieitchat.auto_login(hotReload=True)
itchat.dump_login_status()friends = itchat.get_friends(update=True)[:]
total = len(friends) - 1
male = female = other = 0for friend in friends[1:]:sex = friend["Sex"]if sex == 1:male += 1elif sex == 2:female += 1else:other += 1
# print("男性好友:%.2f%%" % (float(male) / total * 100))
# print("女性好友:%.2f%%" % (float(female) / total * 100))
# print("其他:%.2f%%" % (float(other) / total * 100))
chart = Echart('%s的微信好友性别比例' % (friends[0]['NickName']), 'from WeChat')
chart.use(Pie('WeChat',[{'value': male, 'name': '男性 %.2f%%' % (float(male) / total * 100)},{'value': female, 'name': '女性 %.2f%%' % (float(female) / total * 100)},{'value': other, 'name': '其他 %.2f%%' % (float(other) / total * 100)}],radius=["50%", "70%"]))
chart.use(Legend(["male", "female", "other"]))
del chart.json["xAxis"]
del chart.json["yAxis"]
chart.plot()

   注意 : echarts,是python与百度链接的一个模块,但是支持python3的时候回出现问题--编码问题.需要下载之后对其源码包进行修改

微信群发消息

import itchat
import timeprint('扫一下弹出来的二维码')
itchat.auto_login(hotReload=True)
names = ['chengli', 'fang', 'genggeng', 'hanling', 'juan', 'll', 'short', 'md', 'miao', 'qiaohong', 'shuai','sunhao', 'wangdan', 'whp', 'xiangxiang', 'xinxin']
name = ['short', 'short']
for i in range(16):boom_remark_name = names[i]# boom_remark_name = '亚述'# message = input('输入你要轰炸的内容:')message = '支付宝五福了解一下'boom_obj = itchat.search_friends(remarkName=boom_remark_name)[0]['UserName']itchat.send_msg(msg=message, toUserName=boom_obj)# print(str(boom_remark_name)+'   已发送!')

好友个性签名词云

  分析还有信息,可以发现好友的个性签名.可以获取好友个性签名制作词云.

import os
import reimport itchat
import jieba
import matplotlib.pyplot as plt
import PIL.Image as Image
import numpy as np# wordcloud会根据这张图片在x和y轴上的颜色以及范围等等,布置词云
from wordcloud import WordCloud, ImageColorGeneratordef word_cloud(friends):d = os.path.dirname(__file__)# 获取图片,按照其形状制作my_coloring = np.array(Image.open(os.path.join(d, "2.png")))signature_list = []for friend in friends:signature = friend["Signature"].strip()signature = re.sub("<span.*>", "", signature)signature_list.append(signature)raw_signature_string = ''.join(signature_list)text = jieba.cut(raw_signature_string, cut_all=True)target_signatur_string = ' '.join(text)# 图形颜色,坐标等my_wordcloud = WordCloud(background_color="white", max_words=2000, mask=my_coloring,max_font_size=40, random_state=42,font_path=r"C:\Windows\Fonts\simhei.ttf").generate(target_signatur_string)image_colors = ImageColorGenerator(my_coloring)plt.imshow(my_wordcloud.recolor(color_func=image_colors))plt.imshow(my_wordcloud)plt.axis("off")plt.show()# 保存图片 并发送到手机my_wordcloud.to_file(os.path.join(d, "wechat_cloud.png"))# 发送到手机的微信助手itchat.send_image("wechat_cloud.png", 'filehelper')itchat.auto_login(hotReload=True)
itchat.dump_login_status()friends = itchat.get_friends(update=True)[:]word_cloud(friends)

转载于:https://www.cnblogs.com/zmc940317/p/10984834.html

python微信库 --- itchat相关推荐

  1. Python微信库:itchat ——实现微信自动回复

    参考文章  http://www.nulll.me/index.php/archives/72.html https://blog.csdn.net/mdpsdhr/article/details/6 ...

  2. python微信库wxpy_使用wxpy这个基于python实现的微信工具库的一些常见问题

    使用如下的命令行安装: pip install wxpy Collecting wxpy Downloading https://files.pythonhosted.org/packages/6b/ ...

  3. python微信库wxpy无法登录_使用wxpy这个基于python实现的微信工具库的一些常见问题...

    使用如下的命令行安装: pip install wxpy Collecting wxpy Downloading https://files.pythonhosted.org/packages/6b/ ...

  4. python微信群发itchat

    微信自带的群发助手,每次最多200人,而且还限制多多. 因此自己写一个小程序,实现自动群发. 环境: 1. python 2. itchat库导入 3. 网络.windows or linux 步骤: ...

  5. Python微信操控itchat定时发送消息

    前言 itchat是一个开源的个人微信接口,利用itchat可以实现例如微信自动回复,定时发送信息.详细可查看itchat项目文档,这里我只介绍一些简单的操作,并用10行代码完成定时发送消息. 安装 ...

  6. python微信库有哪些_谁偷偷删了你的微信?别慌!一篇Python学习教程帮你都揪出来...

    contacts) { try { File file = new File(output_path); //删除之前保存的文件 if (file.exists()) { file.delete(); ...

  7. python微信库wxpy_python wxpy微信防撤回功能

    python使用wxpy轻松实现微信防撤回的方法 最近比较闲就随便瞎看,看到了微信防撤回就顺便跟着学着实现一下 使用的是wxpy,安装方法pip install wxpy(我使用的是python2.7 ...

  8. python微信库有哪些_GitHub - zwczou/weixin-python: 微信SDK - 包括微信支付,微信公众号,微信登陆,微信消息处理等...

    微信SDK 提供微信登陆,公众号管理,微信支付,微信消息的全套功能 文档目录 如果需要单独使用其中的某些模块,可以见文档目录的具体模块 如果需要组合在一起可以参考快速开始 目录 安装 使用pip su ...

  9. python微信库we_python微信库we_python操作微信客户端:WechatPCAPI库实现自动化回复...

    目前有一个项目 WechatPCAPI 可以对微信进行操作,简单来说它是直接操作 PC 版微信客户端的,当然它有一定不足之处就是:PC 版微信客户端和 Python 都需要使用指定版本的,本文我们使用 ...

最新文章

  1. 第三百三十八节,Python分布式爬虫打造搜索引擎Scrapy精讲—深度优先与广度优先原理...
  2. LInux 阿里云系统遇到挖矿程序
  3. leetcode236 二叉树的最近公共祖先
  4. import oracle utility_教你如何Oracle数据导入
  5. 帆软报表-打印sql日志设置
  6. JDBC工具类DataSourceUtils,dao接口代码示例;
  7. OpenCV精进之路(十):直方图匹配——模板匹配
  8. 软件设计原则和方法通俗理解
  9. idea重写接口没有@override_【自学C#】|| 笔记 19 接口
  10. 安卓dj专业打碟机软件_djay Pro 2 for mac(专业DJ打碟软件)
  11. 机器学习算法原理与实践(二)、meanshift算法图解以及在图像聚类、目标跟踪中的应用
  12. Unity游戏开发:背包系统的实现
  13. 离散数学 1. 符号表、集合和命题
  14. OCT-模拟电路设计八边形法则的探讨
  15. 搜索——广度——I - A计划 (骑士救公主,三维bfs())
  16. c语言蒸汽流量温度压力补偿运算,当蒸汽流量测量使用温度压力补偿,这七点不容忽略!...
  17. 绩效考核为何不得人心?
  18. 技术概况python_《技》字意思读音、组词解释及笔画数 - 新华字典 - 911查询
  19. 阿里云服务器CPU超分型专有宿主机创建v5实例
  20. php5.3 发送邮件phpemail的使用 (适用php5.3)

热门文章

  1. Vue Router路由管理器
  2. sigmastek泰克锂电池的优点
  3. 代码整洁vs代码肮脏
  4. c语言猜大小游戏的代码,C语言编程 如何构建一个简单的猜数字小游戏
  5. Contrast GAN--- 实现CycleGAN无法实现的“眼一瞎, 猫变狗”,“手一抖,单车变摩托”
  6. Python安装教程【适用各种3.0版本】
  7. 30段极简Python代码,30秒学一个实用技巧!
  8. TCP/IP卷一:63---TCP基础之(ARQ和重传、分组窗口和滑动窗口、流量控制和拥塞控制、设置重传超时)
  9. 【智能语音】神经网络如何模拟人耳听觉机制?
  10. 数据库题目之关系数据理论