From edb51bb696fd86f6749c267bb2ca5a6256144fb0 Mon Sep 17 00:00:00 2001 From: Sergey Karmanov Date: Tue, 10 Oct 2023 23:43:20 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB=20?= =?UTF-8?q?=D0=B4=D0=B0=D1=82=D1=83=20=D0=B2=20=D0=B1=D0=B0=D0=B7=D1=83=20?= =?UTF-8?q?=D0=B4=D0=B0=D0=BD=D0=BD=D1=8B=D1=85=20=D0=B4=D0=BB=D1=8F=20?= =?UTF-8?q?=D0=BE=D1=82=D0=BF=D1=80=D0=B0=D0=B2=D0=BA=D0=B8=20=D0=BE=D0=B4?= =?UTF-8?q?=D0=B8=D0=BD=D0=B0=D0=BA=D0=BE=D0=B2=D1=8B=D1=85=20=D1=81=D0=BE?= =?UTF-8?q?=D0=BE=D0=B1=D1=89=D0=B5=D0=BD=D0=B8=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit close issue #1 --- main.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index 73f84dc..f19aa46 100644 --- a/main.py +++ b/main.py @@ -41,7 +41,7 @@ for tag in soup.find_all('font', size='2', face='VERDANA'): date = tag.select_one('font:nth-of-type(1)').b.text if not(date.split('.')[0] == str(datetime.today().day).zfill(2) and date.split('.')[1] == str(datetime.today().month).zfill(2)): continue - elements.append(tag.select_one('font:nth-of-type(2)').text.replace('\n', '')) + elements.append(date + "$" + tag.select_one('font:nth-of-type(2)').text.replace('\n', '')) if elements == []: print("No posts") @@ -68,10 +68,10 @@ if db is not None: exit() for i in diff: - send_message(i) + send_message(i.split("$",1)[1]) else: for element in elements: - send_message(element) + send_message(element.split("$",1)[1]) # Save database