Skip to content

Commit

Permalink
Merge pull request gelstudios#3 from empathetic-alligator/master
Browse files Browse the repository at this point in the history
Removed dependency on requests!
  • Loading branch information
gelstudios committed May 21, 2013
2 parents f6cbc1a + d639d75 commit 7e054c1
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions gitfiti.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
#!/usr/bin/env python
import os, sys, datetime, math, itertools
try:
import requests
except:
print 'the requests module is required'
exit(1)
import os, sys, datetime, math, itertools, urllib2, json

title='''
'''
Expand Down Expand Up @@ -96,8 +91,8 @@ def get_calendar(username):
"""retrieves the github commit calendar data for a username"""
BASEURL='https://github.com/'
url = BASEURL + 'users/' + username + '/contributions_calendar_data'
req = requests.get(url)
return req.json()
page = urllib2.urlopen(url)
return json.load(page)

def max_commits(input):
"""finds the highest number of commits in one day"""
Expand Down

0 comments on commit 7e054c1

Please sign in to comment.