Browse Source

Ignore 404 errors from google-play-scraper

master
KaKi87 4 months ago
parent
commit
a37072873b
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      gplay.js

+ 2
- 2
gplay.js View File

@@ -15,14 +15,14 @@ module.exports = {
if(res.length === 0) return callback(res);
// Second request : get apps details
Promise.all(res.map(app => GPlay.app({ appId: app.appId })))
.then(apps => Promise.all(apps.map((app, index) => new Promise((resolve, reject) => {
.then(apps => Promise.all(apps.map((app, index) => new Promise(resolve => {
// Index apps
app.index = index;
// Third request : get apps permissions
GPlay.permissions({ appId: app.appId }).then(permissions => {
app.permissions = permissions;
resolve();
}).catch(reject);
}).catch(resolve);
}))).then(() => callback(apps)));
})
.catch(err => console.log(err));

Loading…
Cancel
Save