From 6c50385a0685381184726576ac5435bb5a79a411 Mon Sep 17 00:00:00 2001 From: retoor Date: Mon, 6 Oct 2025 08:04:14 +0200 Subject: [PATCH] Update. --- routers.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/routers.py b/routers.py index e1d1c73..463c84f 100644 --- a/routers.py +++ b/routers.py @@ -555,15 +555,15 @@ async def newspaper_latest(request: Request): newspapers= list(db.query("select * from newspapers order by id desc limit 10")) except IndexError: pass - + articles = [] for newspaper in newspapers: - articles = json.loads(newspaper['articles_json']) - if articles: + articles += json.loads(newspaper['articles_json']) + if len(articles) > 30: for article in articles: for key, value in article.items(): - article[key] = str(value).strip() + article[key] = str(value).strip().replace(' ', '') return templates.TemplateResponse("newspaper_view.html", { "request": request, "newspaper": newspaper,