Tips for using pyCharm: Use regular expressions to quickly form request headers into dictionary format

Select the header information of the request, hold down ctrl+r, and check Regex regular matching
Insert image description here
. Enter:

(.*?):(.*)

'$1':'$2',

Select Replace all to complete the replacement
Insert image description here
Insert image description here

Guess you like

Origin blog.csdn.net/weixin_43810415/article/details/99845901