I am very new to Python and looking for a way to get the current stock price of TESLA. I have this program but it prints out way too much. I am running python 3 connecting to the school computer via Linux. I can not install Pandas, pip requests or conda because I am not authorized. I even tried sudo. I was hoping to find an api something like this: http://api.bart.gov/api/route.aspx? but for tesla. I appreciate any help I can get. At this point ucllib seems to work getting the url.
import urllib.request, urllib.parse
params = { "key": "MW9S-E7SL-26DU-VV8V", "cmd": "routes" }
url = "https://finance.yahoo.com/quote/TSLA/history?period1=1436486400&period2=1594339200&interval=1d&filter=history&frequency=1d" + urllib.parse.urlencode(params)
with urllib.request.urlopen(url) as result:
print(result.read())