def parse_cookies_str ( cookies ) : cookie_dict = { } for record in cookies . split ( ";" ) : key , value = record . strip ( ) . split ( "=" , 1 ) cookie_dict [ key ] = value return cookie_dict
python cookies change to dict
parse cookies str to dict : param cookies : cookies str : type cookies : str : return : cookie dict : rtype : dict
def parse_cookies_str(cookies):
    """
    parse cookies str to dict
    :param cookies: cookies str
    :type cookies: str
    :return: cookie dict
    :rtype: dict
    """
    cookie_dict = {}
    for record in cookies.split(";"):
        key, value = record.strip().split("=", 1)
        cookie_dict[key] = value
    return cookie_dict