facundoolano / google-play-scraper

Node.js scraper to get data from Google Play
MIT License
2.3k stars 626 forks source link

retrieving app gives error #504

Closed saahiluppal closed 2 years ago

saahiluppal commented 2 years ago
var gplay = require('google-play-scraper');

gplay.app({appId: 'com.google.android.apps.translate'})
  .then(console.log, console.log);

this snippet throws the following error

TypeError: Cannot read properties of undefined (reading 'replace')
    at Object.descriptionText [as fun] (D:\french_scraping\node_modules\google-play-scraper\lib\mappers\details.js:125:51)
    at D:\french_scraping\node_modules\google-play-scraper\lib\utils\scriptData.js:52:19
    at XWrap.f (D:\french_scraping\node_modules\ramda\dist\ramda.js:5955:28)
    at XWrap.@@transducer/step (D:\french_scraping\node_modules\ramda\dist\ramda.js:392:25)
    at _arrayReduce (D:\french_scraping\node_modules\ramda\dist\ramda.js:5137:46)
    at _reduce (D:\french_scraping\node_modules\ramda\dist\ramda.js:5167:24)
    at map (D:\french_scraping\node_modules\ramda\dist\ramda.js:5954:20)
    at D:\french_scraping\node_modules\ramda\dist\ramda.js:586:23
    at Object.f2 [as map] (D:\french_scraping\node_modules\ramda\dist\ramda.js:473:22)
    at extractFields (D:\french_scraping\node_modules\google-play-scraper\lib\utils\scriptData.js:40:14)

even providing fullDetail: True in the following snippet gives the same error

var gplay = require('google-play-scraper');

gplay.search({
    term: "panda",
    num: 2,
    fullDetail: true,  // throws same error when set this to true
  }).then(console.log, console.log);
aldochaconc commented 2 years ago

Issue #496 resolves this bug temporally by using ":github:facundoolano/google-play-scraper" as version on your package.json's dependency. I suggest you take a quick look into that thread.

facundoolano commented 2 years ago

closing duplicate of #496