您好,我正在使用 yql 从外部网站获取网页内容。但是,尽管也使用了正确的 xpath 值和 foramt 作为 json,但我总是得到结果为 null。谁能帮我解决这个问题?我正在尝试获取以下网站的内容。如果 yql 有任何问题,谁能给我一些替代 yql 的建议?到目前为止,我已经尝试过了。请看一看。
var site = "http://www.amazon.in/Seiko-Premier-Analog-Blue-Watch/dp/B012T413GO?_encoding=UTF8&ref_=cm_sw_r_wa_apa_i_5c5uzbQG5A293";
site = site.replace('m.', '')
var yql = "SELECT * FROM html WHERE url='" + site + "' AND xpath='//title|//head/meta'";
var resturl = "http://query.yahooapis.com/v1/public/yql?q=" + encodeURIComponent(yql) + "&format=json";
$.getJSON(resturl,function(data){
console.log(data);
})