获取Cookies

class GetCookies():
    def __init__(self):
        a = """TYCID=6ab34ee0e89411e8aea4576c50bb3005; undefined=6ab34ee0e89411e8aea4576c50bb3005; ssuid=5641567282; _ga=GA1.2.569292461.1542258108; __insp_wid=677961980; __insp_nv=true; __insp_targlpu=aHR0cHM6Ly93d3cudGlhbnlhbmNoYS5jb20v; __insp_targlpt=5aSp55y85p_lLeWVhuS4muWuieWFqOW3peWFt1%2FkvIHkuJrkv6Hmga%2Fmn6Xor6Jf5YWs5Y_45p_l6K_iX_W3peWVhuafpeivol%2FkvIHkuJrkv6HnlKjkv6Hmga%2Fns7vnu58%3D; __insp_norec_sess=true; __insp_slim=1556438110535; _gid=GA1.2.2135388223.1560223719; Hm_lvt_e92c8d65d92d534b0fc290df538b4758=1559805555,1560243469,1560301317; RTYCID=0d05130df8654ac490f01dc8810dda0d; aliyungf_tc=AQAAANl1LVzkNAcAmyAVb7nHa2VGt0z0; csrfToken=b84m_nLT61CobWh_CRPqVnod; token=c8891da9872b4182a2b63f3f6f85e7e2; _utm=53c214e4a79f486f943301cd4c78c5b9; tyc-user-info=%257B%2522claimEditPoint%2522%253A%25220%2522%252C%2522myAnswerCount%2522%253A%25220%2522%252C%2522myQuestionCount%2522%253A%25220%2522%252C%2522signUp%2522%253A%25220%2522%252C%2522explainPoint%2522%253A%25220%2522%252C%2522privateMessagePointWeb%2522%253A%25220%2522%252C%2522nickname%2522%253A%2522%25E6%259D%25A8%25E5%25BA%25B7%2522%252C%2522integrity%2522%253A%25220%2525%2522%252C%2522privateMessagePoint%2522%253A%25220%2522%252C%2522state%2522%253A%25220%2522%252C%2522announcementPoint%2522%253A%25220%2522%252C%2522isClaim%2522%253A%25220%2522%252C%2522vipManager%2522%253A%25220%2522%252C%2522discussCommendCount%2522%253A%25221%2522%252C%2522monitorUnreadCount%2522%253A%252290%2522%252C%2522onum%2522%253A%25220%2522%252C%2522claimPoint%2522%253A%25220%2522%252C%2522token%2522%253A%2522eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIxODIwMjk0NzQyNyIsImlhdCI6MTU2MDM4NTY1OCwiZXhwIjoxNTkxOTIxNjU4fQ.uRKBw6IFHVzzQTGbF0SuCSYeOb8kLVw-eqbQ0-_imhOzGREq_6vlVuWbM2m71UyfCOh_tgs2zA0Et1POodOqMA%2522%252C%2522pleaseAnswerCount%2522%253A%25220%2522%252C%2522redPoint%2522%253A%25220%2522%252C%2522bizCardUnread%2522%253A%25220%2522%252C%2522vnum%2522%253A%25220%2522%252C%2522mobile%2522%253A%252218202947427%2522%257D; auth_token=eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIxODIwMjk0NzQyNyIsImlhdCI6MTU2MDM4NTY1OCwiZXhwIjoxNTkxOTIxNjU4fQ.uRKBw6IFHVzzQTGbF0SuCSYeOb8kLVw-eqbQ0-_imhOzGREq_6vlVuWbM2m71UyfCOh_tgs2zA0Et1POodOqMA; bannerFlag=true"""

        self.b = a.split(";")
        self.e = {}

    def func(self, str):
        d = str.split("=")

        return d

    def demo(self, list):
        self.e[list[0]] = list[1]
        return self.e

    def run(self):
        c = list(map(self.func, self.b))
        f = list(map(self.demo, c))[0]

        print(f)


if __name__ == '__main__':
    c = GetCookies()
    c.run()
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值