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

UofT Drop-in sports schedules #85

Open
qasim opened this issue Jan 10, 2017 · 2 comments
Open

UofT Drop-in sports schedules #85

qasim opened this issue Jan 10, 2017 · 2 comments

Comments

@qasim
Copy link
Member

qasim commented Jan 10, 2017

The drop-in sports schedules at UofT SG seems more structured now:

https://kpe.utoronto.ca/sports-and-rec

There are still some differences between sports, but all seem scrape-able. We should take advantage of this.

@kashav
Copy link
Member

kashav commented Jan 10, 2017

Looks like they're loading raw HTML after page load -

jQuery(function($){
  $('#dropinschedule').load('https://class-api.kpe.utoronto.ca:8443/times.php?id_list=6,85,181,182,90,342,675,677&dataonly=true&showcoedcol=true&sport=basketball');
});

I think we can parse the URLs from here and then scrape the HTML from each URL.

The only other approach (as far as I can tell) would be to form a list of all possible id_list values and all possible sport values and then use those (id_list values map to buildings/locations, but not the same ones from the buildings dataset 🙃).

Also, looks like they're only providing data for a week at a time? I think this means that we can't merge this dataset with athletics. Schema can probably remain the same though (minus building_id).

@qasim
Copy link
Member Author

qasim commented Jan 10, 2017

Wow, can't say I'm surprised of the inconsistent building IDs 🙃

We could also limit athletics to just the current week, maybe. Perhaps that's trying too hard to accommodate for this and we should have another endpoint.

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

No branches or pull requests

2 participants