Oct-03-2019, 10:44 AM
(Oct-03-2019, 10:34 AM)stranac Wrote: You write code that will log you in and then keep using a logged-in session.quite right!
You'll need to figure out what requests your browser makes to log you in and recreate those in your code.
This code works:
import webbrowser
import urllib.request
url = 'https://query1.finance.yahoo.com/v7/finance/download/TEN.MI?period1=1451602800&period2=1569708000&interval=1d&events=history&crumb=NZczOoN5ibT'
chrome_path = 'C:/Program Files (x86)/Google/Chrome/Application/chrome.exe %s'
webbrowser.get(chrome_path).open(url)