Browse Source

Ignore 404 errors from google-play-scraper

KaKi87 2 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 = {
15 15
 			if(res.length === 0) return callback(res);
16 16
 			// Second request : get apps details
17 17
 			Promise.all(res.map(app => GPlay.app({ appId: app.appId })))
18
-				.then(apps => Promise.all(apps.map((app, index) => new Promise((resolve, reject) => {
18
+				.then(apps => Promise.all(apps.map((app, index) => new Promise(resolve => {
19 19
 					// Index apps
20 20
 					app.index = index;
21 21
 					// Third request : get apps permissions
22 22
 					GPlay.permissions({ appId: app.appId }).then(permissions => {
23 23
 						app.permissions = permissions;
24 24
 						resolve();
25
-					}).catch(reject);
25
+					}).catch(resolve);
26 26
 				}))).then(() => callback(apps)));
27 27
 		})
28 28
 		.catch(err => console.log(err));

Loading…
Cancel
Save