Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const scraper = require('./scrape.js')
- const models = require('./models.js')
- const processModels = models => Promise.all(
- models.map(model => processLinks(model, model.urls))
- ).then(
- result => console.log(JSON.stringify(result))
- )
- const processLinks = (model, urls) => Promise.all(
- urls.map(url => scraper(model, url))
- )
- processModels(models)
Add Comment
Please, Sign In to add comment