n0madic / google-play-scraper

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

Overall rating numbers and Avg Rating #9

Closed kevincobain2000 closed 2 years ago

kevincobain2000 commented 2 years ago

Hi, Great library and thank you. I was looking for a Google Scraper and found one.

Is there any way to extract the overall number and the average as well? In other words, (from the screenshot below), it'd be nice to extract the 4.3 overall ratings and the distribution numbers, for example for rating 3 the following screenshot presents on hover with 1,137 reviews.

I did try and get all the reviews below

    r := reviews.New("xxx.application.ignore.it", reviews.Options{
        Number:   1000000,
        Language: "ja",
    })

    err := r.Run()
    if err != nil {
        panic(err)
    }

    for _, review := range r.Results {
        // fmt.Println(review.Reviewer, review.Timestamp, review.Score, review.Text)
        fmt.Println(review.Score)
    }
╰─$ go run main.go |grep 3|wc -l
     633

This one doesn't give exact number which is ok since it doesn't extract 100% of the reviews.

Screen Shot 2022-06-10 at 21 06 28