Created
September 3, 2016 17:53
-
-
Save mralext20/70cdaa682644cfb1b93387256be5d8d1 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env python3 | |
import requests, json, calendar, datetime | |
prejson = requests.get('http://schedule-server.riffle.tv/schedule/peekingboo') | |
data = json.loads(prejson.text) | |
#create empty list containing None, will be popped latter. | |
betterdata = [None] | |
#use data[slot number][key] to retreive data. freaking json, being a list of dics | |
#TODO compare data titme instance to dayoff | |
dayoff = '\u26d4\ufe0f DAY OFF' | |
for dict in data: | |
if dict['title'] == dayoff: | |
break; | |
else: | |
betterdata.append((dict['title'],dict['start'])) | |
#end of for loop. better data is now actually useful | |
print(type(betterdata)) | |
print(betterdata) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment