from http.cookies import SimpleCookie
def load_cookie(cookie_str):
"""
cookie 字符串转成字典
:param cookie_str:
:return:
"""
cookie = SimpleCookie()
cookie.load(cookie_str)
cookie_dict = {key: morsel.value for key, morsel in cookie.items()}
return cookie_dict