Last active
September 12, 2023 11:07
-
-
Save e2po/78e9a407adcd18e136e62429c0bad9e2 to your computer and use it in GitHub Desktop.
Python script to fetch min iOS version of an app directly from App 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 | |
def min_os_ver(app_id): | |
print('fetching min os version for app id: ' + str(app_id)) | |
with requests.get("https://itunes.apple.com/lookup?id=" + str(app_id)) as r: | |
for result in r.json()["results"]: | |
return result["minimumOsVersion"] | |
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