这是我的代码:
var request = require('request'),
cheerio = require('cheerio'),
async = require('async');
function updateCars(){
function getReviews(body){
var $ = cheerio.load(body);
var year = $(this).find(".field-item").text();
}
async.series([
....
function(callback) {
request(site+path, function(err, resp, body){
if(!err && resp.statusCode == 200){
var $ = cheerio.load(body);
$(".views-row").each(getReviews(body));
}
});
}
]);
}
当我在节点控制台中运行它时,出现以下错误:
SyntaxError: Malformed attribute selector: object global]
我该如何解决?