facundoolano / google-play-scraper

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

Crash on mapping app details #496

Closed Aliaksandr-Kasko-JazzTeam closed 2 years ago

Aliaksandr-Kasko-JazzTeam commented 2 years ago

Description:

Library crashes on mapping app details

Example code:

const gplay = require('google-play-scraper');
//...
const app = await gplay.app({
    appId: id,
    country: store
});

Error message:

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

Seems that it's applicable only for these 3 countries: kr, tw, hk

skochy commented 2 years ago

I'm also seeing a similar error:

HttpsError: TypeError: Cannot read property 'replace' of undefined
    at Object.getError (/workspace/lib/helpers/util.js:164:12)
    at /workspace/lib/endpoints/scraper_api.js:26:26
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async ScraperApi.scrapeGame (/workspace/lib/endpoints/scraper_api.js:22:16)

and

Error: not found similar link
    at /workspace/node_modules/google-play-scraper/lib/similar.js:37:17
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async ScraperApi.similarTo (/workspace/lib/endpoints/scraper_api.js:61:22)
ansoncen commented 2 years ago

Seems that it's applicable only for these 3 countries: kr, tw, hk

the play store website has been changed to the new version in these three regions. The parser function is no longer valid for the new version of the website.

Aliaksandr-Kasko-JazzTeam commented 2 years ago

@facundoolano ping

icarcal commented 2 years ago

I believe the #498 PR also fixes this issue

adrien1251 commented 2 years ago

Hello, Will you create a new version on npm today?

Sincerely.

facundoolano commented 2 years ago

I won't be around a computer for a couple of weeks so no new npm version until then, you can just use the github commit in your package.json in the meantime

adrien1251 commented 2 years ago

Thanks for your answer, how can we use the commit in the json package? Cause i use it like that in my package json : "dependencies": { "google-play-scraper": "^8.0.4" } Can i put a commit number instead ? "dependencies": { "google-play-scraper": "commit-number" }

ruimateus commented 2 years ago

@adrien1251

"google-play-scraper": "github:facundoolano/google-play-scraper"

works for me

adrien1251 commented 2 years ago

Thank you for your reactivity ! :D

adrien1251 commented 2 years ago

Hi guys, It would be just to know when you plan to update the lib on the npm side because, on my side putting the config in the json package as follows "google-play-scraper": "github:facundoolano/google-play-scraper", my build takes 1h30 to be done. It's good for a "quick" fix but not long term :s

Thanks a lot! :)

eldhosejoys commented 2 years ago

Kindly update it on npm.

facundoolano commented 2 years ago

I won't be around a computer for a couple of weeks so no new npm version until then, you can just use the github commit in your package.json in the meantime

dhung1308 commented 2 years ago

I getting error when using github commit : Error: Error requesting Google Play:connect ECONNREFUSED 127.0.0.1:443

Anyone help me fix it ?

walrus543 commented 2 years ago

I updated nodejs to v16.13.1 and installed this tool from scratch (I had it for a while and I had no package.json file at the root of the directory). In which file do you write the instructions? Example: `var gplay = require('google-play-scraper');

gplay.app({appId: 'com.google.android.apps.translate'}) .then(console.log, console.log);` And how to run it? I just want to download app icons from several apps in one go. Thank you. KDE Neon User Edition 64bits

EDIT: it's working again. I had to update Nodejs, reinstall this tool and follow the above PR 498.

berrybar commented 2 years ago

I believe the #498 PR also fixes this issue

I ran it, but it doesn't work. Is it impossible to bring kr rank??

13389203735 commented 2 years ago

好像只适用于这三个国家:kr, tw, hk

这三个地区的 Play 商店网站已更改为新版本。解析器功能对新版网站不再有效。

Seems that it's applicable only for these 3 countries: kr, tw, hk

the play store website has been changed to the new version in these three regions. The parser function is no longer valid for the new version of the website.

How to deal with this problem

a2kas commented 2 years ago

please update npm package, I have tried to put "google-play-scraper": "github:facundoolano/google-play-scraper" instead of "google-play-scraper": "^8.0.4" but getting same error :/

hmzisb commented 2 years ago

Same with github too. Please fix it.

facundoolano commented 2 years ago

I just published a new version of the package. Closing this issue, let me now if the problem persists.

Aliaksandr-Kasko-JazzTeam commented 2 years ago

@facundoolano still facing this issue for mentioned above kr, hk and tw stores

facundoolano commented 2 years ago

The kr error is a different issue, see #495