From 377296144769de481035c8417584b050d30be358 Mon Sep 17 00:00:00 2001 From: Sergey Karmanov Date: Thu, 31 Aug 2023 12:16:09 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A3=D0=BB=D1=83=D1=87=D1=88=D0=B8=D0=BB=20?= =?UTF-8?q?=D1=84=D0=BE=D1=80=D0=BC=D0=B0=D1=82=D0=B8=D1=80=D0=BE=D0=B2?= =?UTF-8?q?=D0=B0=D0=BD=D0=B8=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sms2tg.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sms2tg.py b/sms2tg.py index 2b8a412..2a7e441 100644 --- a/sms2tg.py +++ b/sms2tg.py @@ -2,10 +2,10 @@ import sys, requests -bot_token = "123456789:ABCdefghIJKlmnOPQrstuVWXYz" -chat_id = "123456789" +bot_token = "6652676823:AAHQdhvn8qpEtRNCJeIgewOKH_LrJAl3Qrk" +chat_id = "374070661" -message = "Пришла новая SMS:\nОтправитель: " + sys.argv[1] + "\nТекст: " + sys.argv[2] +message = "Пришла SMS:\n\nОт: " + sys.argv[1] + "\nТекст: " + sys.argv[2] + "" print(message) @@ -17,7 +17,7 @@ text_file.close() # Send message -req = requests.get("https://api.telegram.org/bot" + bot_token + "/sendMessage?chat_id=" + chat_id + "&text=" + message) +req = requests.get("https://api.telegram.org/bot" + bot_token + "/sendMessage?parse_mode=HTML&chat_id=" + chat_id + "&text=" + message) if (req.status_code != 200): print("Сообщение не отправлено! Статус код: " + str(req.status_code)) else: