def get_icon(self, uid, gid=None):
"""
?????????????
:param uid: ???id
:param gid: ?id?????None????????????None????????
"""
if gid is None:
url = self.base_uri + '/webwxgeticon?username=%s&skey=%s' % (uid, self.skey)
else:
url = self.base_uri + '/webwxgeticon?username=%s&skey=%s&chatroomid=%s' % (
uid, self.skey, self.encry_chat_room_id_list[gid])
r = self.session.get(url)
data = r.content
fn = 'icon_' + uid + '.jpg'
with open(os.path.join(self.temp_pwd,fn), 'wb') as f:
f.write(data)
return fn
wxbot.py 文件源码
python
阅读 30
收藏 0
点赞 0
评论 0
评论列表
文章目录