|
@@ -542,6 +542,17 @@ class WXBot:
|
|
if msg['MsgType'] == 51:
|
|
if msg['MsgType'] == 51:
|
|
msg_type_id = 0
|
|
msg_type_id = 0
|
|
user['name'] = 'system'
|
|
user['name'] = 'system'
|
|
|
|
+ elif msg['MsgType'] == 37:
|
|
|
|
+ weixinhao=msg['Content']
|
|
|
|
+ weixinhao=weixinhao[weixinhao.index('fromusername='):weixinhao.index('encryptusername')]
|
|
|
|
+ weixinhao=weixinhao[weixinhao.index('"')+1:weixinhao.rindex('"')]
|
|
|
|
+ print u'[INFO] 请求加好友!'
|
|
|
|
+ print u' 昵称:' + msg['RecommendInfo']['NickName']
|
|
|
|
+
|
|
|
|
+ print u' 附加消息:'+msg['RecommendInfo']['Content']
|
|
|
|
+
|
|
|
|
+ print u' 微信号:'+weixinhao
|
|
|
|
+ return
|
|
elif msg['FromUserName'] == self.my_account['UserName']:
|
|
elif msg['FromUserName'] == self.my_account['UserName']:
|
|
msg_type_id = 1
|
|
msg_type_id = 1
|
|
user['name'] = 'self'
|
|
user['name'] = 'self'
|