Oct-01-2019, 04:18 PM
(This post was last modified: Oct-01-2019, 04:20 PM by mpellegrini.)
I'd like to download a file present at follow link
But the follow code python get me the error "HTTPError: Unauthorized":
import urllib.request
url = 'https://query1.finance.yahoo.com/v7/finance/download/TEN.MI?period1=1451602800&period2=1569708000&interval=1d&events=history&crumb=NZczOoN5ibT'
urllib.request.urlretrieve(url, 'C:/dati/xxx.csv')
But the follow code python get me the error "HTTPError: Unauthorized":
import urllib.request
url = 'https://query1.finance.yahoo.com/v7/finance/download/TEN.MI?period1=1451602800&period2=1569708000&interval=1d&events=history&crumb=NZczOoN5ibT'
urllib.request.urlretrieve(url, 'C:/dati/xxx.csv')