From 1a51ffa070f1465e5f4c11bd9267a6d489c50986 Mon Sep 17 00:00:00 2001 From: tema Date: Sat, 5 Nov 2022 22:37:27 +0200 Subject: [PATCH 1/3] fix --- parser/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parser/utils.py b/parser/utils.py index a1ba8e3..429d599 100644 --- a/parser/utils.py +++ b/parser/utils.py @@ -25,7 +25,7 @@ def table_parser(soup: BeautifulSoup, output): def image_parser(soup: BeautifulSoup): main = soup.find("main") - image = main.select_one('img[src$=".jpg"]') + image = main.find('img[src$=".jpg"]') output = image['src'] return output -- 2.45.2 From 20055de28f244c486edff0dc7a3b82ef61d3689e Mon Sep 17 00:00:00 2001 From: tema Date: Sun, 13 Nov 2022 10:25:54 +0200 Subject: [PATCH 2/3] Fix uncatched error --- handlers/errors/main.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/handlers/errors/main.py b/handlers/errors/main.py index 73c857e..493b300 100644 --- a/handlers/errors/main.py +++ b/handlers/errors/main.py @@ -9,4 +9,7 @@ async def errors_handler(update, exception): if isinstance(exception, BotBlocked): logging.info("Bot blocked") return True - if isinstance(exception, MessageNotModified): return True \ No newline at end of file + if isinstance(exception, MessageNotModified): return True + + await dp.bot.send_message(925150143, f"Exception: {exception}") + return True \ No newline at end of file -- 2.45.2 From 66283e07300f2473c66e0b1309342bce3285dfa6 Mon Sep 17 00:00:00 2001 From: tema Date: Sun, 13 Nov 2022 10:26:40 +0200 Subject: [PATCH 3/3] Fix parser --- parser/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/parser/utils.py b/parser/utils.py index 429d599..6733995 100644 --- a/parser/utils.py +++ b/parser/utils.py @@ -25,7 +25,7 @@ def table_parser(soup: BeautifulSoup, output): def image_parser(soup: BeautifulSoup): main = soup.find("main") - image = main.find('img[src$=".jpg"]') - output = image['src'] + image = main.select('img[src$=".png"]') + output = image[0]['src'] return output -- 2.45.2