Closed gcatak closed 7 years ago
Just confirming that something's going wrong when it comes google-play-scraper
dep module.
It takes so long to retrieve all apps from store to score, since it takes them with { fullDetail: true, num: 100}
opts in the search method.
If you run your example with a DEBUG=google-play-scraper
env variable, you can see all the requests being made on your terminal.
Running it here, it took over 2 minutes (once it took even 4 minutes to finish) all the times to finish the score to google-play.
If I find a solution, I'll let you guys know.
This is not something going wrong, just working as expected. Google doesn't provide a proper API for the app details, so everything has to be scraped, thus resulting in an extra request per app to get the details needed for score calculations. (I think I had a warning about this in the README at some point, I guess I removed it.)
Memoization helps to mitigate this for recurrent requests, but obviously the proper way to go to get fast calculations would be to scrape the data and store it in a DB, then consuming from there for the calculations, but that's out of the scope of this module.
Sorry, I wasn't clear on what I had written.
I know that, by a technical aspect, the code is working exactly as expected.
I'm just wondering if we could do something to dim the response time or at least point out in the doc some warning with more evidence for google play store, since 2 ~ 4 minutes is a long long time to wait, and comparing it with app store lib we can note a rather discrepant response time difference.
So, I think that the simple user is very unlikely to understand quickly the reason, because, he doesn't know the google-play-scraper
detail implementation when starting to use this module, and if we can't change the way the method works, maybe update the docs to alert about this fact would be nice.
Agreed, this definitely calls for an explanation in the readme.
Added a note about Google Play performance in the readme
My Code:
Output: