add some console.log messages to debug why chaining promises does not work
EUREKA!! The problem can be in scrapper.js file. It creates a function out of a loop (because of JSHint) but this function can be using a wrong reference to the variable 'deferred'. This reference changes every loop iteration, so it only works with the first iteration. If the app is run with one id, it works.