将cookies信息转换成字典

博客介绍了如何使用Python将cookies信息通过split方法转换成字典,其中c.split("=", 1)以等号为界,返回键值对,便于构建cookies字典。" 132156520,19673918,GPS/INS联合导航算法:卡尔曼滤波与Matlab实现,"['导航技术', '传感器融合', '算法实现', '卡尔曼滤波器', 'MATLAB编程']
摘要由CSDN通过智能技术生成
cookies = '_samte_flag_=true; cookie2=142c680171e6535a7756e59ba25; t=9e986bd8b90026495092ffe04; _tb_token_=eeed6f6e637e7; cna=uST+FASe+1UkX9jt5; v=0; _m_h5_tk=2bd5baeed2426b5aa56526e2a2f_1601657673296; _m_h5_tk_enc=15d86c629b060dce52e8b13b6ec1f5f5; xlly_s=1; sgcookie=E100jpSkrCq1t59%2FBqUwRc%2B6WWxGbd2o%2FXFdWN5hWb1SqVWDQdVgLoFsxYCvMXnfe%2F2XOQV6VymPtQqw%3D%3D; unb=292386274; uc3=id2=UUGgrrhTS6og&lg2=VT5L2FSpMGV7TQ%3D%3D&nk2=AicyAaKn7hVLpA%3D%3D&vt3=F8dCufBHtGXkmvd3ouM%3D; csg=108fbd8d; lgc=344555; cookie17=UUGgrrhTS6og; dnk=44555; skt=940f450a64c51458; existShop=MTYwMTY0ODQ0OQ%3D%3D; uc4=nk4=0%40AMxF3LPBiDIGnMHbC0ZqjNezrifA&id4=0%40U2OXlOSQvvyTk4lQIM5U%3D; tracknick=224555; _cc_=U%2BGCWk%2F7og%3D%3D; _l_g_=Ug%3D%3D; sg=549; _nk_=44555; cookie1=VWxid52uwiCnXcW02Q01JpFiduHxX1XjD9ZbGfeXF3w%3D; enc=qauWuXkbaxqOT9Npfrn0IM%2BbU%2FS208RsExt17D968k3InBjOXFPOsiodMN1UQt9J4IvuV2ctCn9m%2FFLZIPVSJg%3D%3D; JSESSIONID=F78C9D274C650C1692DA024BF760E719; mt=ci=73_1; thw=cn; hng=CN%7Czh-CN%7CCNY%7C156; uc1=existShop=false&pas=0&cookie15=URm48syIIVrSKA%3D%3D&cookie16=UIHiLt3xCS3yM2h4eKHS9lpEOw%3D%3D&cookie14=Uoe0bHHmlxx1Iw%3D%3D&cookie21=W5iHLLyFfovo4g%3D%3D; isg=BNnZ_OXq4j8cQ76rXAWECkiC6MWzZs0YatL_bfuCFYBzAv2US7cX6A1UBMZ0umVQ; l=eBS6wX7ROw7Pm8-MBO5wourza77OrdAfGsPzaNbMiInca6ZhNFDAjNQ4rWdJldtjgtCAQUtPDcnX3R3W8MUdg2HvCbKrCyConxvO.; tfstk=cYkRBFGLqEYoBCrxbbd0AQLfgw0daaYLlgahphL6sOcfMsSc0sqKIAhiBQZCy-KA.'

如上是cookies信息.
首先会将cookies  for c in cookies.split("; "),按分号切割成各个小段落.
_samte_flag_
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值