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

Move stats pulling over to CHS #84

Open
vreelb opened this issue Nov 12, 2014 · 6 comments
Open

Move stats pulling over to CHS #84

vreelb opened this issue Nov 12, 2014 · 6 comments

Comments

@vreelb
Copy link
Member

vreelb commented Nov 12, 2014

CHS now keeps track of +/-, so stats no longer need to be pulled from CHN. This will simplify things in the long run, as rosters are pulled from CHS already anyhow.

Unfortunately the parser needs to be rewritten for the new CHS stats pages in order to take advantage of it, but that shouldn't be too difficult.

@vreelb
Copy link
Member Author

vreelb commented Nov 12, 2014

This also means that women's teams will finally have +/- as well!

@hamilr2
Copy link
Member

hamilr2 commented Nov 12, 2014

👍

@hamilr2
Copy link
Member

hamilr2 commented Nov 15, 2014

Unless you've already started on this, I'd like to discuss our scraping techniques. While I think jQuery is an easy and logical way to parse HTML, I'm not sure it entirely makes sense to scrape "client side".

Regardless of what we end up doing, I'd also like to head in a direction where our scraping functions are decoupled from functions that digest/ingest the result. Ideally, we'd have a bunch of different scraping functions that take a couple params and return JSON or Array Objects.

Worth discussing, though. Wednesday at 9ET/6PT?

@csm10495
Copy link
Member

Someone at RCOS talked about this thing called kimono. It turns a webpage into a rest api. In playing with it for like 3 minutes, here is an example of a JSON for RPI's stats. (it could be made better if we put more effort)

Example: http://pastebin.com/NiniURms

@hamilr2
Copy link
Member

hamilr2 commented Nov 23, 2014

Okay, that's a really cool tool. The pricing/request restrictions are RIDICULOUSLY open for free accounts.

I was having trouble getting it to do logical things with some irregular tabular pages like the CHS box scores and live box scores... Part of the problem is they have a lot of ill-defined header rows, and rows with varying types of data. Will probably need to do those via some other method, or perhaps have another layer between scraping and digestion to help normalize the returned data out of Kimono.

I can definitely see it being useful for standardized tabular data and other non-hockey tasks.

It also would satisfy the separation of scraper and digestion/ingestion quite nicely!

@vreelb
Copy link
Member Author

vreelb commented May 23, 2015

Semi-closed in de8a6b9.

Importing now fully uses CHS, updating should be moved over to use CHS as well.

vreelb added a commit that referenced this issue Oct 22, 2015
Manual imports of individual teams can now be done.
Updates the current roster instead of re-loading it in.

Addresses part of #84, but "update all" functionality has not yet been added.
vreelb added a commit that referenced this issue Oct 22, 2015
No longer requires any DOM elements to function.
This should make it easier to implement "Update All" pursuant to #84.

SIDEARM parsing hasn't been moved over yet, but that can happen eventually.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants