python itchat实现微信自动回复
2017-02-16 22:00
861 查看
今天在实验楼发现一个特别好玩的,python 微信库itchat,可以实现自动回复等多种功能,好玩到根本停不下来啊,尤其是调戏调戏不懂计算机的,特别有成就感,哈哈!!
代码如下:
安装一下 itchat即可跑上面程序,实现与图灵机器人的交互。
更多关于itchat的资料,如下:
itchat官网
Python微信库:itchat
代码如下:
#coding=utf8 import requests import itchat KEY = '8edce3ce905a4c1dbb965e6b35c3834d' def get_response(msg): apiUrl = 'http://www.tuling123.com/openapi/api' data = { 'key' : KEY, 'info' : msg, 'userid' : 'wechat-robot', } try: r = requests.post(apiUrl, data=data).json() return r.get('text') except: return @itchat.msg_register(itchat.content.TEXT) def tuling_reply(msg): defaultReply = 'I received: ' + msg['Text'] reply = get_response(msg['Text']) return reply or defaultReply itchat.auto_login(hotReload=True) itchat.run()
安装一下 itchat即可跑上面程序,实现与图灵机器人的交互。
更多关于itchat的资料,如下:
itchat官网
Python微信库:itchat
相关文章推荐
- python itchat实现微信自动回复的示例代码
- Python实现微信自动回复机器人
- 利用python微信库itchat实现微信自动回复功能
- python实现微信自动回复功能
- python实现微信消息群发和微信自动回复
- Python实现微信自动回复机器人(简单)
- python实现微信机器人自动回复
- Python包装网页微信API并实现简单自动回复
- 利用Python实现微信自动回复
- python实现微信小程序自动回复
- Python实现微信自动回复(机器人版本)
- python 实现微信自动回复(自动聊天)
- python实现微信自动回复及接入聊天机器人等功能
- python中利用itchat实现自动回复
- python脚本设置微信自动回复[简单应用]
- 微信接入机器人实现对别人消息和群at消息的自动回复
- 微信自动回复和自动抢红包实现原理(一):AccessibilityService的介绍和配置
- Android通过AccessibilityService实现微信自动回复功能
- 初学Python--微信自动回复信息以及防撤回
- 微信订阅后台自动回复功能的实现