Skip to content

Commit

Permalink
Bump dependencies (#653)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbigman authored Aug 9, 2023
1 parent b0ffa3e commit 96e5462
Show file tree
Hide file tree
Showing 20 changed files with 1,794 additions and 829 deletions.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import R from 'ramda';
import * as R from 'ramda';
import { constants } from './lib/constants.js';
import memoizee from 'memoizee';
import appMethod from './lib/app.js';
Expand Down
2 changes: 1 addition & 1 deletion lib/app.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import R from 'ramda';
import * as R from 'ramda';
import queryString from 'querystring';
import request from './utils/request.js';
import scriptData from './utils/scriptData.js';
Expand Down
2 changes: 1 addition & 1 deletion lib/datasafety.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import R from 'ramda';
import * as R from 'ramda';
import request from './utils/request.js';
import scriptData from './utils/scriptData.js';
import { BASE_URL } from './constants.js';
Expand Down
100 changes: 51 additions & 49 deletions lib/developer.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import url from 'url';
import scriptData from './utils/scriptData.js';
import { BASE_URL } from './constants.js';
import request from './utils/request.js';
import R from 'ramda';
import * as R from 'ramda';
import { checkFinished, processFullDetailApps } from './utils/processPages.js';
import createDebug from 'debug';

Expand Down Expand Up @@ -62,57 +62,59 @@ async function parseDeveloperApps (html, opts) {

const initialMappings = isNaN(opts.devId)
? {
apps: ['ds:3', 0, 1, 0, 22, 0],
token: ['ds:3', 0, 1, 0, 22, 1, 3, 1]
} : {
apps: ['ds:3', 0, 1, 0, 21, 0],
token: ['ds:3', 0, 1, 0, 21, 1, 3, 1]
};
apps: ['ds:3', 0, 1, 0, 22, 0],
token: ['ds:3', 0, 1, 0, 22, 1, 3, 1]
}
: {
apps: ['ds:3', 0, 1, 0, 21, 0],
token: ['ds:3', 0, 1, 0, 21, 1, 3, 1]
};

const appsMappings = isNaN(opts.devId)
? {
title: [0, 3],
appId: [0, 0, 0],
url: {
path: [0, 10, 4, 2],
fun: (path) => new url.URL(path, BASE_URL).toString()
},
icon: [0, 1, 3, 2],
developer: [0, 14],
currency: [0, 8, 1, 0, 1],
price: {
path: [0, 8, 1, 0, 0],
fun: (price) => price / 1000000
},
free: {
path: [0, 8, 1, 0, 0],
fun: (price) => price === 0
},
summary: [0, 13, 1],
scoreText: [0, 4, 0],
score: [0, 4, 1]
} : {
title: [3],
appId: [0, 0],
url: {
path: [10, 4, 2],
fun: (path) => new url.URL(path, BASE_URL).toString()
},
icon: [1, 3, 2],
developer: [14],
currency: [8, 1, 0, 1],
price: {
path: [8, 1, 0, 0],
fun: (price) => price / 1000000
},
free: {
path: [8, 1, 0, 0],
fun: (price) => price === 0
},
summary: [13, 1],
scoreText: [4, 0],
score: [4, 1]
};
title: [0, 3],
appId: [0, 0, 0],
url: {
path: [0, 10, 4, 2],
fun: (path) => new url.URL(path, BASE_URL).toString()
},
icon: [0, 1, 3, 2],
developer: [0, 14],
currency: [0, 8, 1, 0, 1],
price: {
path: [0, 8, 1, 0, 0],
fun: (price) => price / 1000000
},
free: {
path: [0, 8, 1, 0, 0],
fun: (price) => price === 0
},
summary: [0, 13, 1],
scoreText: [0, 4, 0],
score: [0, 4, 1]
}
: {
title: [3],
appId: [0, 0],
url: {
path: [10, 4, 2],
fun: (path) => new url.URL(path, BASE_URL).toString()
},
icon: [1, 3, 2],
developer: [14],
currency: [8, 1, 0, 1],
price: {
path: [8, 1, 0, 0],
fun: (price) => price / 1000000
},
free: {
path: [8, 1, 0, 0],
fun: (price) => price === 0
},
summary: [13, 1],
scoreText: [4, 0],
score: [4, 1]
};

const processedApps = R.map(scriptData.extractor(appsMappings), R.path(initialMappings.apps, html));
const apps = opts.fullDetail
Expand Down
8 changes: 4 additions & 4 deletions lib/list.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/permissions.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import R from 'ramda';
import * as R from 'ramda';
import request from './utils/request.js';
import scriptData from './utils/scriptData.js';
import { BASE_URL, constants } from './constants.js';
Expand Down
4 changes: 2 additions & 2 deletions lib/reviews.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import R from 'ramda';
import * as R from 'ramda';
import request from './utils/request.js';
import scriptData from './utils/scriptData.js';
import { BASE_URL, constants } from './constants.js';
Expand Down Expand Up @@ -28,7 +28,7 @@ function validate (opts) {
throw Error('appId missing');
}

if (opts.sort && !R.contains(opts.sort, R.values(constants.sort))) {
if (opts.sort && !R.includes(opts.sort, R.values(constants.sort))) {
throw new Error('Invalid sort ' + opts.sort);
}
}
Expand Down
2 changes: 1 addition & 1 deletion lib/search.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import R from 'ramda';
import * as R from 'ramda';
import url from 'url';
import request from './utils/request.js';
import { BASE_URL } from './constants.js';
Expand Down
2 changes: 1 addition & 1 deletion lib/similar.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import R from 'ramda';
import * as R from 'ramda';
import url from 'url';
import request from './utils/request.js';
import queryString from 'querystring';
Expand Down
2 changes: 1 addition & 1 deletion lib/utils/appList.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import url from 'url';
import R from 'ramda';
import * as R from 'ramda';
import scriptData from './scriptData.js';
import { BASE_URL } from '../constants.js';

Expand Down
2 changes: 1 addition & 1 deletion lib/utils/mappingHelpers.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as cheerio from 'cheerio';
import R from 'ramda';
import * as R from 'ramda';

function descriptionHtmlLocalized (searchArray) {
const descriptionTranslation = R.path([12, 0, 0, 1], searchArray);
Expand Down
2 changes: 1 addition & 1 deletion lib/utils/processPages.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import R from 'ramda';
import * as R from 'ramda';
import request from '../utils/request.js';
import scriptData from '../utils/scriptData.js';
import appList from '../utils/appList.js';
Expand Down
2 changes: 1 addition & 1 deletion lib/utils/scriptData.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import createDebug from 'debug';
import R from 'ramda';
import * as R from 'ramda';

const debug = createDebug('google-play-scraper:scriptData');

Expand Down
Loading

0 comments on commit 96e5462

Please sign in to comment.