diff --git a/README.md b/README.md index e0cc22a..75d9f38 100644 --- a/README.md +++ b/README.md @@ -613,6 +613,7 @@ https://www.events.utoronto.ca/ end_date: String, start_time: Number, end_time: Number, + duration: Number, url: String, description: String, admission_price: String, diff --git a/uoftscrapers/scrapers/events/__init__.py b/uoftscrapers/scrapers/events/__init__.py index af4040a..d1bd180 100644 --- a/uoftscrapers/scrapers/events/__init__.py +++ b/uoftscrapers/scrapers/events/__init__.py @@ -116,6 +116,8 @@ def get_event_doc(url_tail): event_start_time = Events.convert_time(event_start_str) event_end_time = Events.convert_time(event_end_str) + event_duration = event_end_time - event_start_time + evt_bar = soup.select('#evt_bar')[0] event_url = evt_bar.select('dd')[1].a['href'] event_price = evt_bar.select('dl')[1].dd.text @@ -149,6 +151,7 @@ def get_event_doc(url_tail): ('end_date', event_end_date), ('start_time', event_start_time), ('end_time', event_end_time), + ('duration', event_duration), ('url', event_url), ('description', event_description), ('admission_price', event_price),