-
Notifications
You must be signed in to change notification settings - Fork 14
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
UTEvents #36 #56
Conversation
Scraper.logger.info('Scraped event: %s ' % ( | ||
doc['id'], | ||
)) | ||
with open('%s/%s.json' % (location, doc['id']), 'w') as fp: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use Scraper.save_json(...)
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: |
There was a problem hiding this comment.
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).
Oh, @arkon didn't see the helpers. I will change them right away. :V |
@@ -0,0 +1,126 @@ | |||
from ..scraper import Scraper |
There was a problem hiding this comment.
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
|
||
event_campus = 'Off Campus' | ||
if evt_bar.select('dd')[0].b != None: | ||
event_campus = evt_bar.select('dd')[0].b.text |
There was a problem hiding this comment.
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 = ''
I tested this out further. I left a few more comments and will be glad to merge after they're completed! |
@qasim Kay done. ✌️ |
Btw I didn't change setup.py and version numbers. |
That's fine, we'll release a new version sometime next week. Thanks again for contributing :) |
Well that was fun.
Am I part of the cool kids now?