app.get("/getFull/:ssilka/:page", function(request, response) {
var ssilka = request.params.ssilka;
var page = request.params.page;
GetDetailInfo("/"+ssilka+"/"+page,function(data){
console.log(data);
response.write(200,{"Content-Type" : "text/plain"});
// response.write(data);
});
response.end();
});
function GetDetailInfo(url,callback){
var req = request("http://www.xxx.ru"+url, function (error, response, html) {
if (!error && response.statusCode == 200) {
var $ = cheerio.load(html);
console.log($);
var data = $('.main').html().toString();
callback(data) ;}
});
}