Am I using the correct site to view the raw JSON data?

依然范特西╮ 提交于 2020-01-25 06:50:35

问题


Using NBA Team Stats through Google Chrome's network tool, I believe I located the site to lead me to the raw JSON data

As a result, I am using the following URL:

https://stats.nba.com/stats/leaguedashteamstats?Conference=&DateFrom=&DateTo=&Division=&GameScope=&GameSegment=&LastNGames=0&LeagueID=00&Location=&MeasureType=Base&Month=0&OpponentTeamID=0&Outcome=&PORound=0&PaceAdjust=N&PerMode=PerGame&Period=0&PlayerExperience=&PlayerPosition=&PlusMinus=N&Rank=N&Season=2019-20&SeasonSegment=&SeasonType=Regular+Season&ShotClockRange=&StarterBench=&TeamID=0&TwoWay=0&VsConference=&VsDivision=

However, when I try to go to the above site, it does not load. This leads me to believe that perhaps I am looking at the wrong piece of information to get me to where I am trying to go. Any tips?


回答1:


That specific page seems to require a Referer header to be sent with the request so just loading it on it's own won't work.

In Power BI you can set custom headers if you select Advanced when adding a Web data source. In the optional Header section enter Referer and a value of https://stats.nba.com/.



来源:https://stackoverflow.com/questions/59830897/am-i-using-the-correct-site-to-view-the-raw-json-data

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!