From dfee8b23146a5535b7bc3bb23581c5e88d994a68 Mon Sep 17 00:00:00 2001 From: MuslemRahimi Date: Fri, 6 Dec 2024 21:14:45 +0100 Subject: [PATCH] add source to wiim --- app/cron_wiim.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/cron_wiim.py b/app/cron_wiim.py index b7414b1..a5a7c05 100755 --- a/app/cron_wiim.py +++ b/app/cron_wiim.py @@ -90,7 +90,7 @@ async def get_endpoint(session, symbol, con): change_percent = '-' except Exception as e: change_percent = '-' - res_list.append({'date': new_date_str, 'text': item['title'], 'changesPercentage': change_percent}) + res_list.append({'date': new_date_str, 'text': item['title'], 'changesPercentage': change_percent, 'url': item['url']}) except: pass @@ -142,7 +142,7 @@ async def run(): cursor = con.cursor() cursor.execute("PRAGMA journal_mode = wal") - cursor.execute("SELECT DISTINCT symbol FROM stocks") + cursor.execute("SELECT DISTINCT symbol FROM stocks WHERE symbol NOT LIKE '%.%'") stock_symbols = [row[0] for row in cursor.fetchall()] etf_con = sqlite3.connect('etf.db')