Retrieve and return the contributions calender as a string; split into lines later as part of the processing stage.

This commit is contained in:
Jochen Kupperschmidt
2016-06-10 00:15:16 +02:00
parent 18b49c1dad
commit 4d4af436f4

View File

@ -219,14 +219,14 @@ def retrieve_contributions_calendar(username, base_url):
print(e)
raise SystemExit
return page.read().decode('utf-8').splitlines()
return page.read().decode('utf-8')
def find_max_daily_commits(contributions_calendar):
"""finds the highest number of commits in one day"""
output = set()
for line in contributions_calendar:
for line in contributions_calendar.splitlines():
for day in line.split():
if 'data-count=' in day:
commit = day.split('=')[1]