程序员最近都爱上了这个网站  程序员们快来瞅瞅吧!  it98k网:it98k.com

本站消息

站长简介/公众号

  出租广告位,需要合作请联系站长

+关注
已关注

分类  

暂无分类

标签  

暂无标签

日期归档  

获取所有人的生日密码

发布于2019-08-06 10:19     阅读(482)     评论(0)     点赞(5)     收藏(1)


import requests
import pprint


def login_api():
    values = {
        "username": "xxxxx@qq.com",
        "password": "xxxx",
        "url": "",
        "ismobile": "false",
        "rememberMe": "true"
    }
    res = requests.post("https://pre.xxxxx.com.cn/api2/user/login", data=values)
    a = res.cookies["PHPSESSID"]
    # print(a)
    return a


def list_name(sessionid):
    headers = {
        "Cookie": "PHPSESSID=" + sessionid,
    }
    # print(headers)    #{'cookie': 'PHPSESSID=513c1540e26ee8ef45fd2fbf096c817e'}
    res = requests.get("https://pre.xxxxx.com.cn/api2/user/contacts/GetUsers?start=0&perPage=100&role_id=1",
                       headers=headers)
    # pprint.pprint(res.json()["result"]["aaData"])
    everypne = res.json()["result"]["aaData"]
    # pprint.pprint(everypne)
    a = []
    for i in everypne:
        a.append(i[0])

    res = requests.get("https://pre.xxxxx.com.cn/api2/user/contacts/GetUsers?start=100&perPage=100&role_id=1"


所属网站分类: 技术文章 > 博客

作者:小姐可不可以

链接:https://www.pythonheidong.com/blog/article/7571/e37121c3c3e16bdafc36/

来源:python黑洞网

任何形式的转载都请注明出处,如有侵权 一经发现 必将追究其法律责任

5 0
收藏该文
已收藏

评论内容:(最多支持255个字符)