Commit e91308bb authored by Stefano Rivera's avatar Stefano Rivera

Skip duplicate events

DebConf14 has a talk scheduled in two slots.
parent d2972668
......@@ -78,12 +78,16 @@ def dc14_filename(title):
def scrape_videos(tree, conference, args):
seen = set()
for day in tree.iter('day'):
date = dateutil.parser.parse(day.attrib['date']).date()
print('Date:', date)
for penta_event in day.iter('event'):
id_ = penta_event.attrib['id']
if id_ in seen:
continue
seen.add(id_)
title = penta_event.find('title').text
video = penta_filename(id_)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment