Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UTEvents #36 #56

Merged
merged 12 commits into from
Apr 19, 2016
Merged

UTEvents #36 #56

merged 12 commits into from
Apr 19, 2016

Conversation

g3wanghc
Copy link
Member

Well that was fun.

Am I part of the cool kids now?

Scraper.logger.info('Scraped event: %s ' % (
doc['id'],
))
with open('%s/%s.json' % (location, doc['id']), 'w') as fp:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use Scraper.save_json(...)

@qasim
Copy link
Member

qasim commented Apr 19, 2016

#36

Woohoo! Thanks for contributing Hanchen, I really appreciate it. 😅

Will have a look and test this before the end of the day.

import json
import re

class UTEvents:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can rename this to Events to follow convention (since it is for all 3 campuses, there is no prefix).

@g3wanghc
Copy link
Member Author

Oh, @arkon didn't see the helpers. I will change them right away. :V

@@ -0,0 +1,126 @@
from ..scraper import Scraper
Copy link
Member

@kashav kashav Apr 19, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be from ..utils import Scraper

@g3wanghc
Copy link
Member Author

@arkon @qasim @kshvmdn Using given Scrape functions, changed it to Event and removed a bunch of imports. ¯_(ツ)_/¯


event_campus = 'Off Campus'
if evt_bar.select('dd')[0].b != None:
event_campus = evt_bar.select('dd')[0].b.text
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

event_campus should take on a value of UTSG, UTM, or UTSC depending on the campus (instead of St. George, etc.) to follow convention.

In the case of no campus / off campus, we can just leave event_campus = ''

@qasim
Copy link
Member

qasim commented Apr 19, 2016

I tested this out further. I left a few more comments and will be glad to merge after they're completed!

@g3wanghc
Copy link
Member Author

@qasim Kay done. ✌️

@g3wanghc
Copy link
Member Author

Btw I didn't change setup.py and version numbers.

@qasim
Copy link
Member

qasim commented Apr 19, 2016

That's fine, we'll release a new version sometime next week. Thanks again for contributing :)

@qasim qasim merged commit 385b6fc into cobalt-uoft:master Apr 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants