Cookie信息转化为字典格式 记录一下代码~ import re strs = 'Cookie信息' strList = re.split(r';\S*', strs) cookie = {} for items in strList: item = items.split('=') key, value = item[0], item[1] cookie[str(key)] = str(value) print(cookie)