pip install jsonpath
import jsonpath d1={"token":"hjshdsjhdsjadhsa","expire":"7200"} print( jsonpath.jsonpath(d1,'$.token')[0])
输出的值为: