Last active
April 5, 2020 18:06
-
-
Save Ehsanul-Hoque/7174e42ea310eca03e60214a2a3405c5 to your computer and use it in GitHub Desktop.
Python code for generating release apk automatically (Part 4)
This file contains 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 | |
# ... | |
# Function for downloading icon | |
def downloadIcon(item_dict): | |
print('\nDOWNLOADING icon file...') | |
url = item_dict[constants.JSON_KEY_APP_ICON] | |
try: | |
r = requests.get(url, allow_redirects=True) | |
with open(constants.APP_ICON_FILE, 'wb') as file_object: | |
file_object.write(r.content) | |
print('Icon file downloaded.') | |
return True | |
except: | |
print('Icon file download failed!') | |
return False |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment