将cookie转化为字典格式
其实就是对cookie做了简单的处理,目的是为了节省时间…
你们可以参考,也可以直接复制过去用,基本适用于大部分cookie格式
# @Author : Keep
# @File : 处理cookie信息格式.py
# 处理cookie信息
cookie = ('cookie: _zap=d368da5c-946c-4fb8-a566-04b2b33c51d9; _xsrf=oNkVQXFiBgRN0eBC4loWGcqFU0xOCJYg; d_c0="ALDRoxNamBGPTkjuza0PmLwmToHOaMve14U=|1595061936"; _ga=GA1.2.1214823354.1595061937; z_c0="2|1:0|10:1595129150|4:z_c0|92:Mi4xNXQ0NUV3QUFBQUFBc05HakUxcVFU1lBQUFCZ0FsVk5QZ3NCWUFCWmhreklQUUQ3aVd1TlFwV3RJZNjSzRSZ2tn|344b646de3ae67072d5d59b6f10d496e5ac51212f2aa7756d9ac92240f42747"; q_c1=c87d3db0f1dc4a44ad59840f448b64df|1607954766000|1598058990000; tst=r; Hm_lvt_98beee57fd2ef70ccdd5ca5b9740c49=1609652948,1609663446,1609681332,1609817459; Hm_lpvt_98beee57fd2ef70ccdd5ca52b9740c49=1609817459; SESSONID=EcYmruhfBDiQrtLUtYNrHjx1gX1u2402e0hzbuHCQ4N; KLBRSID=81978cf28cf03c58e07f705c156aa833|1609817460|1609817457; JOID=U18VB0rByGc2TsJje8Seem9bnf1rgqw6XjyxDBmDigljObYpKbQWlWxIw2B6CGICxFLeOM1nClSXkgc0R3D8aXc=; osd=UVoWAUzDzWQwSMBmeMKYeGpYm_tph688WD60Dx-FiAxgP7ArLLcQk25NwGZ8CmcBwlTcPc5hDFaSkQyRXX_b3E=')
cookie = cookie.split('; ')
for lis in cookie:
# print(lis)
li = lis.replace("=","':'")
print("'"+li+"'"+',')
转换完后的格式: