NHL.com + Sochi 2014 Data URLs in JSON and JSONP

Discussion in 'By The Numbers' started by Step7750, Feb 1, 2014.

  1. Kane One

    Kane One Registered User

    Joined:
    Feb 6, 2010
    Messages:
    35,458
    Likes Received:
    408
    Trophy Points:
    125
    Location:
    Brooklyn, New NY
    After three years since my post saying I'd do PHP and MySQL, I'd now also use C# with SQL Server. I would however use MVC on the client-side such as Angular or jQuery and only use C# for the API. That's if I'm only planning on using the server for the website.

    Since my VPS runs Ubuntu and I use it for other apps, I'd probably just scrap out C# with either Java or Python (I'd likely go with Python) and scrap SQL Server with MySQL.

    One thing that is guaranteed is I am not touching PHP ever again.
     
  2. morehockeystats

    morehockeystats Unusual hockey stats

    Joined:
    Dec 13, 2016
    Messages:
    341
    Likes Received:
    40
    Trophy Points:
    36
    Occupation:
    sysadmin
    Location:
    San Jose
    Home Page:
    They do.
    That's what they came up with in 2007 and kept it since.
    What they should've done in 2007 and what they should be doing now that's another matter.
     
  3. morehockeystats

    morehockeystats Unusual hockey stats

    Joined:
    Dec 13, 2016
    Messages:
    341
    Likes Received:
    40
    Trophy Points:
    36
    Occupation:
    sysadmin
    Location:
    San Jose
    Home Page:
    I do all programming in Perl/bash with the least amount of JS possible on website pages (I do use d3)
    The data from the games goes into MongoDB. The data for the website is summarized from Mongo into MySQL.
     
  4. Kane One

    Kane One Registered User

    Joined:
    Feb 6, 2010
    Messages:
    35,458
    Likes Received:
    408
    Trophy Points:
    125
    Location:
    Brooklyn, New NY
    I think we're both referring to two separate pages. :laugh:

    There's that bland HTML page which shows all the game data, which I'm assuming that's what you're referring to. If so, then you're definitely right.

    I'm talking about the Gamecenter data, which refreshes automatically.
     
  5. morehockeystats

    morehockeystats Unusual hockey stats

    Joined:
    Dec 13, 2016
    Messages:
    341
    Likes Received:
    40
    Trophy Points:
    36
    Occupation:
    sysadmin
    Location:
    San Jose
    Home Page:
    Oh, yes, indeed. I get most of my data from the bland HTML. :) It does have that self-refreshing JS though. :)
     
  6. Kane One

    Kane One Registered User

    Joined:
    Feb 6, 2010
    Messages:
    35,458
    Likes Received:
    408
    Trophy Points:
    125
    Location:
    Brooklyn, New NY
    Is all of that data on the Gamecenter page? If so, there may be JSON files there you could scrape the data from, because those JSONs must be getting updated after corrections.
     
  7. morehockeystats

    morehockeystats Unusual hockey stats

    Joined:
    Dec 13, 2016
    Messages:
    341
    Likes Received:
    40
    Trophy Points:
    36
    Occupation:
    sysadmin
    Location:
    San Jose
    Home Page:
    AFAIK, not all the PBP data in the HTML page is present in the JSON. But I'll review that in June.
     
  8. HeresLookingAtEuclid

    HeresLookingAtEuclid Registered User

    Joined:
    May 6, 2017
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    0
    You need to collect from both. Each has data the other does not.

    My "holy grail" is a single feed that has everything. Presumably it would be a structured document like JSON.

    (Also, whoever designed the JSON schema needs to be slapped.)
     
  9. morehockeystats

    morehockeystats Unusual hockey stats

    Joined:
    Dec 13, 2016
    Messages:
    341
    Likes Received:
    40
    Trophy Points:
    36
    Occupation:
    sysadmin
    Location:
    San Jose
    Home Page:
    As I am rewriting my scraper I took a thorough look, and I couldn't find anything but the stuff you listed. One thing I didn't do was to trace the loading of the webpage during the match itself, I will have to do it for the next game on June 5th.

    It looks like the Roster json is indeed missing (and not really necessary because the HTML roster report is fairly easy to parse). I couldn't find any use for gcbx and gcsb and the Scoreboard and the live content (but my needs might've been different).

    So for me it all practically boiling down to:
    * PlayByPlay.json
    * live feed
    * PL.html, GS.html, ES.html (TV/TH.html for you, I guess - they do get updated live)

    Comparing these I find that the live feed doesn't have On-Ice information, PBP.json has it but only has Shot, Hit, Penalty and Goal events, and PL.html has everything but the parser is tougher. The live feed may yield GS/ES unnecessary though.
     
  10. morehockeystats

    morehockeystats Unusual hockey stats

    Joined:
    Dec 13, 2016
    Messages:
    341
    Likes Received:
    40
    Trophy Points:
    36
    Occupation:
    sysadmin
    Location:
    San Jose
    Home Page:
    Looks like the PlayByPlay feed and the Roster feed are not at these addresses anymore.

    Has anyone figured out where they are now?
     
  11. PuckNuts

    PuckNuts Registered User

    Joined:
    Apr 15, 2007
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    59
    Location:
    London, Ontario
    Thanks Again,

    My results for daily scores has been updated, the old source is not available.

    My attempt to mimic TSN/SportsNet score board...

    NHL Scores

    Regards
    PuckNuts
     
  12. Kane One

    Kane One Registered User

    Joined:
    Feb 6, 2010
    Messages:
    35,458
    Likes Received:
    408
    Trophy Points:
    125
    Location:
    Brooklyn, New NY
    I just started last night redoing my now-shutdown website which calculated NHL standings using different point systems, such as the three-point system. To start, I made a small .NET Core library whose only method returns the records for each team. It's only parameter is the season, in a format like "20172018".

    Feel free to use and make any suggestions.

    Github: GitHub - parkerrappaport/NhlStandings
    NuGet: NhlStandings 1.0.0.0

    Let me know if there are any issues.
     
    Last edited: Mar 8, 2018
  13. meetc

    meetc Registered User

    Joined:
    Jun 30, 2014
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    4
    I'm looking for a data source for this year's schedule, my old data source either hasn't been posted yet or is not being added for the upcoming season. It was games per calendar day: http://live.nhle.com/GameData/GCScoreboard/<Y-m-d>.jsonp
    The page with full schedule for the season as a whole also isn't available: http://live.nhle.com/GameData/SeasonSchedule-20182019.json

    All I need are game ID, teams, day and time.

    I have a home made goal light, but I need the schedule for games in order for it to work.
     
  14. Kane One

    Kane One Registered User

    Joined:
    Feb 6, 2010
    Messages:
    35,458
    Likes Received:
    408
    Trophy Points:
    125
    Location:
    Brooklyn, New NY
    https://statsapi.web.nhl.com/api/v1/schedule?startDate=2018-09-21&endDate=2018-12-21

    Change the start and end dates to the range you want.
     
    morehockeystats likes this.
  15. PuckNuts

    PuckNuts Registered User

    Joined:
    Apr 15, 2007
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    59
    Location:
    London, Ontario

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
monitoring_string = "358c248ada348a047a4b9bb27a146148"