@bem_ben: I see what u did here ( ͡° ͜ʖ ͡°)
TEST mozna zakopywac
- 7
- #
request("[https://xd.xd](https://xd.xd)", function(err, resp, body){
var $ = cheerio.load(body);
var idArray = [];
$('div.post').each(function(){
var postId = $(this).attr('id');
if ($(this).classList.contains('sticky')) {
console.log("sticky");
} else {
console.log("nie sticky");
}
//idArray.push(postId);
//console.log(postId);
});
//console.log(idArray);
});
request("[https://xd.xd/",](https://xd.xd/",) function(err, resp, body){
var $ = cheerio.load(body);
var idArray = [];
$('div.post').each(function(){
var postId = $(this).attr('id');
idArray.push(postId);
});
for(i=0;i0){
console.log("sticky")
} else {
console.log("nie sticky");
}
});
}//loop
});//request
for(i=0;i0){
idArray = idArray.filter(item => item !== idArray[i])
}
});
}
Wykop.pl