Skip to content

Commit

Permalink
Merge pull request #72 from kshvmdn/event-durations
Browse files Browse the repository at this point in the history
Event durations
  • Loading branch information
qasim committed Apr 28, 2016
2 parents 353f22b + 68616ff commit d47ff24
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 3 additions & 0 deletions uoftscrapers/scrapers/events/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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),
Expand Down

0 comments on commit d47ff24

Please sign in to comment.