Last active
January 27, 2025 20:01
-
-
Save NetMan134/33d90569cc42ed7c819a50a479fdc4b0 to your computer and use it in GitHub Desktop.
Retrieve latest iOS app version from Apple iTunes (AppStore) website.py
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
def get_app_version(app_id): | |
url = f'https://itunes.apple.com/lookup?id={app_id}' | |
response = requests.get(url) | |
if response.status_code == 200: | |
data = response.json() | |
if data['resultCount'] > 0: | |
version = data['results'][0]['version'] | |
return version | |
app_id = input("App id: ") | |
app_version = get_app_version(app_id) | |
print(app_version) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment