某个http请求的换回结果如下,我想请问一下怎么使用python提取ax的值了?
jQuery11118698409732322222_3333176245555('{ \
"result": "success", \
"code": 1000, \
"message": "login required", \
"data": {"ax" : "AX-6663166-kfBWl1h6JL2uZISb0Ep0aThuuljj3n", "es" : "e1s1"} \
}')
我试着用下面这种方式提取ax,但是没有获取到值,麻烦各位大神帮我看一看
import re
import sys
ax= ax.findall(r'"ax" : "(.+?)",',sys.argv[2])[0].replace("\n","").replace("\r","")
print(ax)