Can the data submitted by requests be character string? Look at the details

date= "username=admin&password=123123&template9=&finnger10=&finnger9=&template10=&login_type=pwd&client_language=zh-cn"

usually use browser F12 to obtain post information, and then manually modify it to dictionary type submission, which feels very troublesome. If strings are not supported, is there a good way to quickly convert to dictionary type? It"s troublesome to change it manually.

Mar.16,2021

Just append

to url:
http://api/path/?username=adm.

-Don't notice that it's a post request, so turn it into a dictionary.

import urlparse

data= "username=admin&password=123123&template9=&finnger10=&finnger9=&template10=&login_type=pwd&client_language=zh-cn"
params = dict ([(kpenery v [0]) for kpene v in urlparse.parse_qs (data). Items ()])

Menu