King Karl
five-year run of unparalleled suffering
Hi all, just wondering if anyone know the link to Capgeek's json/xml table. It's either that or manually inserting 800+ players salary into a database.
Hi all, just wondering if anyone know the link to Capgeek's json/xml table. It's either that or manually inserting 800+ players salary into a database.
Crap. Time constraints probably won't allow for it.They don't release one. Think about creating a program to scrape the data from their website, even though it's against their rules.
http://capgeek.com/data-usage/
Crap. Time constraints probably won't allow for it.
I'm creating an nhl statistics page. I'm a second year CS student, and I figured what's better than NHL stats for a databases project. I've finished the page (Apart from a few little bugs), so feel free to take a look. https://web.cs.dal.ca/~egener/index.phpWhat are you exactly creating?
I'm creating an nhl statistics page. I'm a second year CS student, and I figured what's better than NHL stats for a databases project. I've finished the page (Apart from a few little bugs), so feel free to take a look. https://web.cs.dal.ca/~egener/index.php
http://www.capgeek.com/armchair-gm/scripts/controller.php?mode=in_season&type=acquire_players&_=1417476555608
http://www.capgeek.com/armchair-gm/scripts/controller.php?mode=in_season&type=team&id=9&date=2014-12-01
{ "teams": [{"id":6,"name":"Anaheim Ducks","abbreviation":"ANA"},{"id":25,"name":"Arizona Coyotes","abbreviation":"ARI"},{"id":5,"name":"Boston Bruins","abbreviation":"BOS"},{"id":8,"name":"Buffalo Sabres","abbreviation":"BUF"},{"id":9,"name":"Calgary Flames","abbreviation":"CGY"},{"id":10,"name":"Carolina Hurricanes","abbreviation":"CAR"},{"id":11,"name":"Chicago Blackhawks","abbreviation":"CHI"},{"id":12,"name":"Colorado Avalanche","abbreviation":"COL"},{"id":13,"name":"Columbus Blue Jackets","abbreviation":"CBJ"},{"id":14,"name":"Dallas Stars","abbreviation":"DAL"},{"id":15,"name":"Detroit Red Wings","abbreviation":"DET"},{"id":1,"name":"Edmonton Oilers","abbreviation":"EDM"},{"id":16,"name":"Florida Panthers","abbreviation":"FLA"},{"id":17,"name":"Los Angeles Kings","abbreviation":"LAK"},{"id":18,"name":"Minnesota Wild","abbreviation":"MIN"},{"id":2,"name":"Montreal Canadiens","abbreviation":"MTL"},{"id":19,"name":"Nashville Predators","abbreviation":"NSH"},{"id":20,"name":"New Jersey Devils","abbreviation":"NJD"},{"id":21,"name":"New York Islanders","abbreviation":"NYI"},{"id":22,"name":"New York Rangers","abbreviation":"NYR"},{"id":23,"name":"Ottawa Senators","abbreviation":"OTT"},{"id":24,"name":"Philadelphia Flyers","abbreviation":"PHI"},{"id":26,"name":"Pittsburgh Penguins","abbreviation":"PIT"},{"id":3,"name":"San Jose Sharks","abbreviation":"SJS"},{"id":27,"name":"St. Louis Blues","abbreviation":"STL"},{"id":28,"name":"Tampa Bay Lightning","abbreviation":"TBL"},{"id":4,"name":"Toronto Maple Leafs","abbreviation":"TOR"},{"id":29,"name":"Vancouver Canucks","abbreviation":"VAN"},{"id":30,"name":"Washington Capitals","abbreviation":"WAS"},{"id":7,"name":"Winnipeg Jets","abbreviation":"WPG"}] }
Great info and awesome sources for NHL stats! Any ideas for getting stats from the upcoming (or past) IIHF World Championships?
They'll probably have an app for it, I'll look at the network requests if I have time...
For example the last years stats can be found here: http://stats.iihf.com/Hydra/387/index.html.
But all the actual data can only be found in PDF files, which I found hard to read automatically. There's a few open source php classes to read the contents of a PDF file, but for some reason the game summaries can't be read.
Hence the need for a API or a service.
{
"gameNumber": 1,
"tournamentPhase": 9,
"gamePhase": "PR",
"group": "A",
"venue": "PRA",
"venueName": "Prague / O2 Arena",
"homeTeam": "CAN",
"guestTeam": "LAT",
"hot": 0,
"liveCommentaryAvailable": 0,
"guessAvailable": 1,
"notificationsCount": 148,
"progressPerc": 0,
"progressCode": "Scheduled",
"homeTeamScore": 0,
"guestTeamScore": 0,
"guestTeamGuess": 216,
"homeTeamGuess": 415,
"checkInsCount": 2,
"playoff": 0,
"homeBestPlayer": 0,
"guestBestPlayer": 0,
"tournamentID": 414,
"highlightsURL": "",
"uniqueID": "1t414",
"notification": 0,
"notifGoal": 0,
"notifPeriod": 0,
"notifGame": 0,
"notifLocal": 0,
"userGuess": 0,
"userCheckIn": 0,
"venueLat": 50.1048,
"venueLong": 14.4938,
"venueFoursquareId": "4adcdaa3f964a5207e4e21e3",
"homeCramo": 0,
"guestCramo": 0,
"showTime": 1,
"dateTime": "1430489700"
}
{
"gameNumber": 1,
"tournamentPhase": 9,
"gamePhase": "PR",
"group": "A",
"venue": "PRA",
"venueName": "Prague / O2 Arena",
"homeTeam": "CAN",
"guestTeam": "LAT",
"hot": 0,
"liveCommentaryAvailable": 0,
"guessAvailable": 1,
"notificationsCount": 148,
"progressPerc": 0,
"progressCode": "Scheduled",
"homeTeamScore": 0,
"guestTeamScore": 0,
"guestTeamGuess": 216,
"homeTeamGuess": 415,
"checkInsCount": 2,
"playoff": 0,
"homeBestPlayer": 0,
"guestBestPlayer": 0,
"tournamentID": 414,
"highlightsURL": "",
"uniqueID": "1t414",
"notification": 0,
"notifGoal": 0,
"notifPeriod": 0,
"notifGame": 0,
"notifLocal": 0,
"userGuess": 0,
"userCheckIn": 0,
"venueLat": 50.1048,
"venueLong": 14.4938,
"venueFoursquareId": "4adcdaa3f964a5207e4e21e3",
"homeCramo": 0,
"guestCramo": 0,
"showTime": 1,
"dateTime": "1430489700"
}
Unknown
Unknown
Unknown
Unknown
{
"noc": "AUT",
"homeJersey": "http://static.egluservices.com/iihf/jerseys/t1415/dress_aut_home.png?5f",
"awayJersey": "http://static.egluservices.com/iihf/jerseys/t1415/dress_aut_away.png?5f",
"tournamentID": 414,
"notification": 0,
"notifGoal": 0,
"notifPeriod": 0,
"notifGame": 0,
"notifLocal": 0,
"uniqueId": "AUTt414",
"cheersCount": 6,
"userCheer": 0
}
Unknown
Unknown
Unknown
I just stumbled upon an incredibly handy tool you guys would love.
http://www.import.io.
As an example, enter: http://www.nhl.com/ice/standings.htm?type=lea#&navid=nav-stn-league
It returns a perfect table of the standings.
If you download the desktop version, you're given an API key so you could use their Python script to get a .json file as output. There are things you could use the program for, but the Python API is the only one I'll need so far.
Edit - It is free, by the way. Don't let that Pricing link on top scare you since it's mainly for people/companies with a bigger need.
It's a good idea, but parsing the HTML yourself will reduce overhead, minimize API request costs, and allow more flexibility in data extraction. I tested out some JSON, the service seems to not parse it.
That's true. For my small needs, I don't really need to worry about the overhead, so I just care about the easiness and this is definitely easy. It also gives me good practice with JSON since I never used it before until yesterday and now I feel pretty good about it.
How do you find these JSON files you posted above? I tried to look at the requests on nhl.com for the standings and I couldn't find anything, so I'm wondering if you know how to find something like that.
I look at dynamic applications and components of sites and proceed to analyze their traffic and code. A lot of websites are delivered statically, hence the difficulty for you to find the dynamic APIs. Try to look for parts of the site that have dynamic components and other versions of that data (mobile etc...).
Thanks for reminding me about the standings, NHL doesn't require the use of a device ID in the request anymore:
The following is in JSON (GET) from NHL's servers (most likely the regular season only)
http://f.nhl.com/nhl/leagueapp/20142015/standings/standingsO1T1.json
Even then, I still don't have a use for the millions of stats and videos I've mined on NHL's services. Maybe I should make a public API, I don't really know. I'm pretty sure I've developed extraction/parsing methods for every format the NHL has had for data since 1999.
Thanks! That would be cool if you were to do that, even though I use only two pages from nhl.com. Maybe others would want to use more.
And just out of curiosity, where did you find that URL from? As in, where on which page requested it?
It wasn't on an HTML page, it was on their mobile app (https://itunes.apple.com/ca/app/nhl/id465092669?mt=8). I'm pretty sure they use certificate validation, so you should be mindful of that if you try logging requests with MITM attacks.
I've found their internal API (for 2015 Worlds), it is in JSON and completely utilizes POST requests.
They most likely don't want this to be made a public developer API for aspects of abuse; don't hammer their servers.
Here you go...
Kudos to you man! Very convincing.
Can I find then entire request list of the rest API somewhere? I queried the API with last years tournamentId 387 but I still can't find what I'm looking for - meaning player stats of a single game.
{
"gameNumber": 1,
"tournamentPhase": 9,
"gamePhase": "PR",
"group": "B",
"venue": "MIN",
"venueName": "Minsk / Minsk Arena",
"homeTeam": "SUI",
"guestTeam": "RUS",
"hot": 0,
"liveCommentaryAvailable": 0,
"guessAvailable": 0,
"notificationsCount": 7752,
"progressPerc": 100,
"progressCode": "Game Completed",
"homeTeamScore": 0,
"guestTeamScore": 5,
"guestTeamGuess": 4971,
"homeTeamGuess": 3825,
"checkInsCount": 455,
"playoff": 0,
"homeBestPlayer": 25320,
"guestBestPlayer": 15613,
"tournamentID": 387,
"highlightsURL": "",
"uniqueID": "1t387",
"notification": 0,
"notifGoal": 0,
"notifPeriod": 0,
"notifGame": 0,
"notifLocal": 0,
"userGuess": 0,
"userCheckIn": 0,
"venueLat": 53.9362,
"venueLong": 27.482,
"venueFoursquareId": "4ce14b3098ab6a312d7e62e1",
"homeCramo": 0,
"guestCramo": 0,
"showTime": 1,
"dateTime": "1399643100"
}
Make sure every request has this header: Content-Type: application/x-www-form-urlencoded; otherwise it will fail.
This is an internal API, there is no full request list or documentation. With the header change, the API works fine for retrieving tournament 387.
Has anyone ever found (or looked) for JSON data for Sweden's second division (Hockey Allsvenskan)?
I'm trying to put together player game-by-game stats.
Their site (http://www.hockeyallsvenskan.se/) looks fairly static, and the only other resource I know of is http://stats.swehockey.se
I'm not sure they even have a player database with playerID's though...
Thoughts?