【发布时间】:2016-02-20 13:14:24
【问题描述】:
我有一个发布数据的端点。
r = requests.post(url, data=data, headers=headers)
我在 Javascript 中得到以下响应:-
throw 'allowScriptTagRemoting is false.';
(function() {
var r = window.dwr._[0];
//#DWR-INSERT
//#DWR-REPLY
r.handleCallback("1", "0", {
msg: "",
output: {
msg: "Showing from city center",
resultcode: 1,
scrpresent: true,
srclatitude: "28.63244546123956",
srclongitude: "77.21981048583984",
},
result: "success"
});
})();
如何解析响应?我基本上想要output json。我怎样才能得到相同的?
【问题讨论】:
-
正则表达式和 json.loads
标签: javascript python json python-requests