This is the URL I'm trying to use python to pull back the json data from:
This is the code (keep in mind I'm very new to learning Python):
import requests
url = 'https://www.fangraphs.com/leaders.aspx?'
params = dict(
pos='all',
stats='bat',
lg='all',
qual='y',
type='8',
season='2018',
month='0',
season1='2018',
ind='0'
)
resp = requests.get(url=url, params=params)
data = resp.json()
print(data)
Am I setting this up right?