Skip to content

Instantly share code, notes, and snippets.

@mralext20
Created September 3, 2016 17:53
Show Gist options
  • Save mralext20/70cdaa682644cfb1b93387256be5d8d1 to your computer and use it in GitHub Desktop.
Save mralext20/70cdaa682644cfb1b93387256be5d8d1 to your computer and use it in GitHub Desktop.
#!/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