non prof image generation finished
This commit is contained in:
@@ -327,7 +327,7 @@ def updateWeather():
|
||||
all_daily_settings = json.load(f)
|
||||
f.close()
|
||||
|
||||
f = open('csv/daily_weather.json', 'r')
|
||||
f = open('csv/current_weather.json', 'r')
|
||||
all_current_settings = json.load(f)
|
||||
f.close()
|
||||
|
||||
@@ -370,8 +370,8 @@ def updateWeather():
|
||||
current_weather['rain_chance'] = r.json()['hourly'][0]['pop']
|
||||
|
||||
|
||||
if location in current_locations:
|
||||
current_weathers[location] = current_weather
|
||||
|
||||
current_weathers[location] = current_weather
|
||||
|
||||
daily_weather = []
|
||||
daily = r.json()['daily']
|
||||
@@ -385,8 +385,8 @@ def updateWeather():
|
||||
daily_weather.append(dct)
|
||||
|
||||
|
||||
if location in daily_locations:
|
||||
daily_weathers[location] = daily_weather
|
||||
|
||||
daily_weathers[location] = daily_weather
|
||||
|
||||
|
||||
|
||||
@@ -546,7 +546,11 @@ def checkStocks(last_update, update_frequency):
|
||||
closing = NY_time.replace(hour=16, minute=0, second=0, microsecond=0).replace(tzinfo=None)
|
||||
|
||||
|
||||
symbols, stock_info = readJSON('csv/stocks_settings.json', max_stocks)
|
||||
f = open('csv/stocks_settings.json', 'r')
|
||||
all_stocks_settings = json.load(f)
|
||||
f.close()
|
||||
stock_info = all_stocks_settings['symbols']
|
||||
symbols = list(stock_info.keys())
|
||||
|
||||
updated = False
|
||||
|
||||
@@ -589,8 +593,7 @@ if __name__ == '__main__':
|
||||
|
||||
|
||||
newsapi = NewsApiClient(api_key='cf08652bd17647b89aaf469a1a8198a9')
|
||||
updateNews()
|
||||
sys.exit()
|
||||
|
||||
|
||||
update_frequencies = {'stocks':2, 'crypto':10, 'news':120, 'weather': 120, 'sports': 120} #minutes
|
||||
|
||||
@@ -610,7 +613,8 @@ if __name__ == '__main__':
|
||||
#f.close()
|
||||
|
||||
|
||||
|
||||
updateWeather()
|
||||
sys.exit()
|
||||
try:
|
||||
f = open('csv/last_updates.json', 'r')
|
||||
last_updates = json.load(f)
|
||||
|
Reference in New Issue
Block a user