Skip to content

Instantly share code, notes, and snippets.

@alexghi
Forked from iosifnicolae2/Readme.md
Last active June 23, 2022 18:41
Show Gist options
  • Save alexghi/1a12258d6d14512c869a945dcc2c24bc to your computer and use it in GitHub Desktop.
Save alexghi/1a12258d6d14512c869a945dcc2c24bc 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, 5):
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