Created
September 3, 2021 14:42
-
-
Save e2po/9b7f8d847f3df08edd632abfc447aced to your computer and use it in GitHub Desktop.
Python script to fetch min Android version of an app directly from Google Play Store
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import csv | |
import sys | |
import pandas | |
from google_play_scraper import app | |
def min_os_ver(app_id): | |
print('fetching min os version for app id: ' + str(app_id)) | |
try: | |
return app(app_id, lang = 'en', country = 'us')['androidVersion'] | |
except: | |
return '-' | |
csv_input_file = sys.argv[1] | |
csv_output_file = sys.argv[2] | |
csv_input = pandas.read_csv(csv_input_file) | |
csv_input['minimum_os_version'] = csv_input['app_identifier'].apply(min_os_ver) | |
csv_input.to_csv(csv_output_file) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Install
Usage
Note: Script requires a CSV input with the
application_identifier
column.Sample Input
Sample Output