伙计们,当我试图使用backlinks_refdomains和backlinks_refips从SEMRUSH API https://www.semrush.com/api-analytics/#domain_rank中获取数据时,它显示了这个错误。
当我调用相同的函数domain_rank时,它以json格式响应我。你能帮我解决这个问题吗。附加的图像是结果,当是给我domain_rank,但没有其他因素,如baclinks等。我正在使用这个代码。
`
module.exports = {
index: function(req,res){
console.log("Hello welocme!");
var SEMRushAPI = require('sails-semrush');
var URL = "www.flipkart.com";
var database = {database:'us'};
var semrush = new SEMRushAPI('XXXXXXXXXXXXXXX');
semrush.backlinks(URL, database, function(err, response){
if (err){
console.log("There is some error to fetching web traffic on API !");
console.log("err: ",err);
console.log("There is some error to fetching web traffic on API !");
}else{
console.log("backlinks");
console.log(" Response: ",response);
console.log("**************** Get the web traffic successfully ***************");
console.log("******zone, country, ip*******");
}
semrush.backlinks_refdomains(URL, database, function(err, response){
if (err){
console.log("There is some error to fetching web traffic on API !");
console.log("err: ",err);
console.log("There is some error to fetching web traffic on API !");
}else{
console.log("domain_score_asc, domain_score_desc, backlinks_asc, backlinks_desc, last_seen_asc, last_seen_desc, first_seen_asc, first_seen_desc");
console.log(" Response: ",response);
console.log("**************** Get the web traffic successfully **************");
console.log("zone, country, ip");
}
});`
提前感谢!!
发布于 2017-03-14 22:32:37
您是否尝试对函数使用close ()?
有漏掉的括号')':
1) semrush.backlinks(URL,数据库,函数(错误,响应){
尝试修复它: semrush.backlinks(URL,database,function(err,response)){
2) semrush.backlinks_refdomains(URL,数据库,函数(错误,响应){
尝试修复它: semrush.backlinks_refdomains(URL,database,function(err,response)){
https://stackoverflow.com/questions/42781231
复制相似问题