Created
October 3, 2019 00:47
-
-
Save raulperdomo/a3ce05467e4d2982eba42a475875cd29 to your computer and use it in GitHub Desktop.
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 pprint | |
import datetime | |
month = datetime.date.today() | |
print(month.month) | |
url = 'http://api.aladhan.com/v1/calendar' | |
params = { | |
'latitude' : 42.2808, | |
'longitude' : -83.7430, | |
'year' : month.year, | |
'method' : 2, | |
'month' : month.month | |
} | |
r = requests.get(url, params) | |
data = r.json() | |
#pprint.pprint(data['data'][1]) | |
for i in range(31): | |
print('Day: ' + str(i)) | |
timings = data['data'][i]['timings'] | |
for a,b in enumerate(timings): | |
print(b +" : " + timings[b]) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment