google-play-scraper icon indicating copy to clipboard operation
google-play-scraper copied to clipboard

duplication of processPages methods

Open facundoolano opened this issue 3 years ago • 0 comments

we have many instances of processPages (aka processAndRecur) functions with a lot of duplicated code. See if a single one can be reused everywhere or a parametrized functinon (s) can be used instead, to reduce duplication.

./lib/reviews.js:146:  const url = `${BASE_URL}/_/PlayStoreUi/data/batchexecute?rpcids=qnKhOb&f.sid=-697906427155521722&bl=boq_playuiserver_20190903.08_p0&hl=${lang}&gl=${country}&authuser&soc-app=121&soc-platform=1&soc-device=1&_reqid=1065213`;
./lib/search.js:38:    url: `${BASE_URL}/_/PlayStoreUi/data/batchexecute?rpcids=qnKhOb&bl=boq_playuiserver_20190424.04_p0&hl=${opts.lang}&gl=${opts.country}&authuser=0&soc-app=121&soc-platform=1&soc-device=1`,
./lib/permissions.js:26:  const url = `${BASE_URL}/_/PlayStoreUi/data/batchexecute?rpcids=qnKhOb&f.sid=-697906427155521722&bl=boq_playuiserver_20190903.08_p0&hl=${opts.lang}&authuser&soc-app=121&soc-platform=1&soc-device=1&_reqid=1065213`;
./lib/utils/processPages.js:57:  const url = `${BASE_URL}/_/PlayStoreUi/data/batchexecute?rpcids=qnKhOb&f.sid=-697906427155521722&bl=boq_playuiserver_20190903.08_p0&hl=${opts.lang}&gl=${opts.country}&authuser&soc-app=121&soc-platform=1&soc-device=1&_reqid=1065213`;

facundoolano avatar Jan 18 '22 23:01 facundoolano