From 02e24155473719bc8af8859aa6c421670c77b751 Mon Sep 17 00:00:00 2001 From: Kashav Madan Date: Wed, 27 Apr 2016 23:49:53 -0400 Subject: [PATCH 1/2] Add duration key --- uoftscrapers/scrapers/events/__init__.py | 3 +++ 1 file changed, 3 insertions(+) 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), From 68616ff945464f9b80a390eb6f3f40df7a96bfdd Mon Sep 17 00:00:00 2001 From: Kashav Madan Date: Wed, 27 Apr 2016 23:50:35 -0400 Subject: [PATCH 2/2] Add duration key to events --- README.md | 1 + 1 file changed, 1 insertion(+) 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,