接口返回一个Html页面,怎么取出页面里面的Json对象?
查询接口例:http://bdcjhq.hexun.com/quote?s2=000001.sh,399001.sz,399300.sz,601186.sh返回结果:<h...
查询接口例:
http://bdcjhq.hexun.com/quote?s2=000001.sh,399001.sz,399300.sz,601186.sh
返回结果:
<html><head><meta
http-equiv="Content-Type" content="text/html;
charset=GBK"><script
type='text/javascript'>document.domain='hexun.com';</script>&
lt;/head><body><
/body><script>try{parent.bdcallback({"399001.sz":{na:"深证成
指",pc:"11446.372",op:"11459.016",vo:"2193906",tu:"379028",hi:"11624.467",lo:"11459.016",la:"11558.021",type:"1",time:"2011-01-26
11:30:22"},"399300.sz":{na:"沪深300
",pc:"2938.654",op:"2939.773",vo:"21205501",tu:"2559517",hi:"2971.763",lo:"2939.356",la:"2960.847",type:"1",time:"2011-01-26
11:31:07"},"601186.sh":{na:"中国铁
建",pc:"7.22",op:"7.22",vo:"174035",tu:"12804",hi:"7.42",lo:"7.22",la:"7.39",type:"2",time:"2011-01-26
11:30:15",sy:"18.45",lt:"24.50",sz:"911.74",hs:"0.71",is:"0"},"tofnow":{time:"2011-01-26
11:37:51"}})}catch(e){}</script></html>
怎么把里面的json对象取出来? 展开
http://bdcjhq.hexun.com/quote?s2=000001.sh,399001.sz,399300.sz,601186.sh
返回结果:
<html><head><meta
http-equiv="Content-Type" content="text/html;
charset=GBK"><script
type='text/javascript'>document.domain='hexun.com';</script>&
lt;/head><body><
/body><script>try{parent.bdcallback({"399001.sz":{na:"深证成
指",pc:"11446.372",op:"11459.016",vo:"2193906",tu:"379028",hi:"11624.467",lo:"11459.016",la:"11558.021",type:"1",time:"2011-01-26
11:30:22"},"399300.sz":{na:"沪深300
",pc:"2938.654",op:"2939.773",vo:"21205501",tu:"2559517",hi:"2971.763",lo:"2939.356",la:"2960.847",type:"1",time:"2011-01-26
11:31:07"},"601186.sh":{na:"中国铁
建",pc:"7.22",op:"7.22",vo:"174035",tu:"12804",hi:"7.42",lo:"7.22",la:"7.39",type:"2",time:"2011-01-26
11:30:15",sy:"18.45",lt:"24.50",sz:"911.74",hs:"0.71",is:"0"},"tofnow":{time:"2011-01-26
11:37:51"}})}catch(e){}</script></html>
怎么把里面的json对象取出来? 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询