services.py 文件源码

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

项目:wxnotify 作者: mxgnene01 项目源码 文件源码
def get_user_list():
    '''
    ????????? ???openid, ??
    '''
    access_token = yield find_access_token()
    if access_token is None:
        raise Return(False)

    client = AsyncHTTPClient()
    resp = yield client.fetch(tornado_options.get_user_list_url.format(access_token, ''))
    openids = json.loads(resp.body).get('data').get('openid')

    result = dict()
    for openid in openids:
        ret = yield get_user_detail(openid)
        tmp = dict(headimgurl = ret.get('headimgurl'), openid = ret.get('openid'), nickname = ret.get('nickname'))
        result[openid] = tmp

    raise Return(result)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号