From 6bc38c400e91620605de785d465927dc730e1a11 Mon Sep 17 00:00:00 2001 From: Firepup Sixfifty Date: Wed, 1 May 2024 15:40:41 -0500 Subject: [PATCH] Formatting --- news.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/news.py b/news.py index a684bf5..8c01f57 100755 --- a/news.py +++ b/news.py @@ -9,18 +9,18 @@ while any(len(drops[i]) > 77 for i in drops.keys()): ind = -1 g = False for j in drops.keys(): - ind += 1 - if len(drops[j]) > 77: - if len(drops[j].split()) > 1: - g = True - break - else: - drops[j] = drops[j][:74] + "..." + ind += 1 + if len(drops[j]) > 77: + if len(drops[j].split()) > 1: + g = True + break + else: + drops[j] = drops[j][:74] + "..." if not g: break - if drops.get(ind+1,None) == None: - drops[ind+1] = "" - drops[ind+1] = f"{drops[ind].split()[-1]} {drops[ind+1]}".strip() + if drops.get(ind + 1, None) == None: + drops[ind + 1] = "" + drops[ind + 1] = f"{drops[ind].split()[-1]} {drops[ind+1]}".strip() drops[ind] = " ".join(drops[ind].split()[:-1]) title = "\n * ".join(drops.values()).lstrip("\n") link = doc[5][1].attrib["href"]