Skip to content

Instantly share code, notes, and snippets.

@iosifnicolae2
Last active June 23, 2022 18:35
Show Gist options
  • Save iosifnicolae2/44df1b83a13e6d1a067a33fb7820b14e to your computer and use it in GitHub Desktop.
Save iosifnicolae2/44df1b83a13e6d1a067a33fb7820b14e to your computer and use it in GitHub Desktop.
Scraping Google Play Reviews

Installation

python3 -m pip install google-play-scraper

Run

python3 main.py

Open the output CSV file by dropping it on Google Drive.

import csv
from google_play_scraper import Sort, reviews_all
APP_ID = "com.reflectlyApp"
all_results = []
for x in range(1, 6):
results = reviews_all(
APP_ID,
sleep_milliseconds=0, # defaults to 0
lang='en', # defaults to 'en'
country='us', # defaults to 'us'
sort=Sort.MOST_RELEVANT, # defaults to Sort.MOST_RELEVANT
filter_score_with=x # defaults to None(means all score)
)
all_results.extend(results)
if __name__ == '__main__':
f = open('{}_reviews.csv'.format(APP_ID), 'w')
output = csv.writer(f)
output.writerow(all_results[0].keys()) # header row
for row in all_results:
output.writerow(row.values())
f.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment