{
accept:application/json, text/plain, */*,
accept-encoding:gzip, deflate, br,
accept-language:zh-CN,zh;q=0.9,
cookie:WEIBOCN_WM=3349; H5_wentry=H5; backURL=https%3A%2F%2Fweibo.cn%2Fpub%2F; ALF=1584539077; SUB=_2A25zTuiWDeRhGeNP61oS-SrJzDiIHXVQsIjerDV6PUNbktAKLUfzkW1NTqMO3QGVY_i9GeEuZSiVxSx04l8-yRWI; SUBP=0033WrSXqPxfM725Ws9jqgMF55529P9D9WWi-0BjzXnrsGFc5DkVrqsr5JpX5KzhUgL.Fo-pehn01KBfS0B2dJLoIp7LxKML1KBLBKnLxKqL1hnLBoMNeo-X1h5p1hz7; SUHB=0u5BWtIACEqxH2; SSOLoginState=1581947078; _T_WM=67403922423; WEIBOCN_FROM=1110006030; MLOGIN=1; XSRF-TOKEN=1cbef2; M_WEIBOCN_PARAMS=luicode%3D20000174%26fid%3D102803%26uicode%3D10000011,
mweibo-pwa:1,
referer:https://m.weibo.cn/sw.js,
user-agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3947.100 Safari/537.36,
x-requested-with:XMLHttpRequest,
x-xsrf-token:1cbef2,}
粘贴上面的内容到pycharm,选择括号中所有的部分,替换对话框中输入下面内容
查找 (.*?):(.*), 替换 "$1":"$2",
$1代表第一个()中部分,$2代表第二个()中部分
结果如下:
{
"accept":"application/json, text/plain, */*",
"accept-encoding":"gzip, deflate, br",
"accept-language":"zh-CN,zh;q=0.9",
"cookie":"WEIBOCN_WM=3349; H5_wentry=H5; backURL=https%3A%2F%2Fweibo.cn%2Fpub%2F; ALF=1584539077; SUB=_2A25zTuiWDeRhGeNP61oS-SrJzDiIHXVQsIjerDV6PUNbktAKLUfzkW1NTqMO3QGVY_i9GeEuZSiVxSx04l8-yRWI; SUBP=0033WrSXqPxfM725Ws9jqgMF55529P9D9WWi-0BjzXnrsGFc5DkVrqsr5JpX5KzhUgL.Fo-pehn01KBfS0B2dJLoIp7LxKML1KBLBKnLxKqL1hnLBoMNeo-X1h5p1hz7; SUHB=0u5BWtIACEqxH2; SSOLoginState=1581947078; _T_WM=67403922423; WEIBOCN_FROM=1110006030; MLOGIN=1; XSRF-TOKEN=1cbef2; M_WEIBOCN_PARAMS=luicode%3D20000174%26fid%3D102803%26uicode%3D10000011",
"mweibo-pwa":"1",
"referer":"https://m.weibo.cn/sw.js",
"user-agent":"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3947.100 Safari/537.36",
"x-requested-with":"XMLHttpRequest",
"x-xsrf-token":"1cbef2",}