I've been trying to figure out how to use the timeout, problem with my code is that its way to fast, I could not discover how to do it with Request. everything else seems to work great
var Scraper = function() {
for (i in userid) {
//create complete url
totalurl = facebookurl + userid[i];
// request facebook open graph
// WARNING the request func should be called every 1-3 secs?
request(totalurl, function(error, response, html) {
if (!error && response.statusCode == 200) {
// console.log(html);
}
});
};
};
Scraper();