Used json.load instead of loads (no need to read out file).
This commit is contained in:
@ -91,8 +91,8 @@ def get_calendar(username):
|
|||||||
"""retrieves the github commit calendar data for a username"""
|
"""retrieves the github commit calendar data for a username"""
|
||||||
BASEURL='https://github.com/'
|
BASEURL='https://github.com/'
|
||||||
url = BASEURL + 'users/' + username + '/contributions_calendar_data'
|
url = BASEURL + 'users/' + username + '/contributions_calendar_data'
|
||||||
page = urllib2.urlopen(url).read()
|
page = urllib2.urlopen(url)
|
||||||
return json.loads(page)
|
return json.load(page)
|
||||||
|
|
||||||
def max_commits(input):
|
def max_commits(input):
|
||||||
"""finds the highest number of commits in one day"""
|
"""finds the highest number of commits in one day"""
|
||||||
|
Reference in New Issue
Block a user