wxbot.py 文件源码

python
阅读 30 收藏 0 点赞 0 评论 0

项目:Wechat-tool-for-USC-Second-hand-Group 作者: tonnkie 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号