Skip to content

Instantly share code, notes, and snippets.

Created Mar 14, 2017
What would you like to do?
Sarah & Duck upcoming episodes
PID = 'b04drklx'
for date in arrow.Arrow.range('day',,
soup = BeautifulSoup(get_contents('' % date.format('YYYY/MM/DD')))
for series in soup.findAll('span', resource=re.compile(PID)):
root = series.findParents(typeof="BroadcastEvent")[0]
season = root.find(typeof='TVSeason')
start_time = root.find(property='startDate')['content']
title = season.nextSibling.string
series_num = season.find(property='name').string
episode_num = root.find('abbr').find(property='position').string
synopsis = root.find(property='description').string
PID = 'b04drklx'
j = json.loads(get_contents('' % PID))
for broadcast in j['broadcasts']:
start_time = arrow.get(broadcast['start'])
title = broadcast['programme']['title']
series_num = broadcast['programme']['programme']['position']
episode_num = broadcast['programme']['position']
synopsis = broadcast['programme']['short_synopsis']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment