|
|
@ -53,7 +53,8 @@ def update_confirmed_cases(): |
|
|
|
def scrape_yahoo(id_): |
|
|
|
BASE_URL = 'https://query1.finance.yahoo.com/v7/finance/download/' |
|
|
|
now = int(datetime.now().timestamp()) |
|
|
|
url = f'{BASE_URL}{id_}?period1=1579651200&period2={now}&interval=1d&events=history' |
|
|
|
url = f'{BASE_URL}{id_}?period1=1579651200&period2={now}&interval=1d&' + \ |
|
|
|
'events=history' |
|
|
|
return pd.read_csv(url, usecols=['Date', 'Close']).set_index('Date').Close |
|
|
|
covid = pd.read_csv('https://covid.ourworldindata.org/data/owid-covid-data.csv', |
|
|
|
usecols=['location', 'date', 'total_cases']) |
|
|
|