n0madic / google-play-scraper

Golang scraper to get data from Google Play Store
GNU Lesser General Public License v3.0
78 stars 20 forks source link

Review collection stucks when there's no enough reviews #6

Closed emreoktem closed 2 years ago

emreoktem commented 2 years ago

I was testing the code about collecting of new reviews with following configuration:

r := reviews.New("com.kolayrandevu.isletme", reviews.Options{ Number: 100, Sorting: store.SortNewest, Language: "zh", })

When I run this, the code first collects the initial reviews successfully for 2 existing reviews on Google Play. Later on, the following code in reviews.go creates an infinite loop because the number property I've provided is 100 but the available reviews on Google Play is only 2.

for len(reviews.Results) != reviews.options.Number {

emreoktem commented 2 years ago

Thanks for the quick fix. Much appreciated.