cookies字符串转化为字典

cookie_str = re.findall(r'xman_t=.*?;', cookie)[0] + re.findall(r'(cookie2=.*?);', cookie)[0]
    cookies = {item.split('=')[0]: item.split('=')[1] for item in cookie_str.split(';')}

 

posted @ 2020-08-27 10:34  阿磊小哥哥呀  阅读(307)  评论(0编辑  收藏  举报