Repository: profcomff/dwh-pipelines
Pull request #258: Ssl cert fix
Author: login: VladislavVoskoboinik
Created: 2025-05-17T12:36:43Z | Merged: 2025-05-20T09:06:51Z

## Изменения
<!-- Опишите здесь на языке, понятном каждому, изменения, сделанные в исходном коде по пунктам. -->
Фикс дага проверки баланса vds. Поменялся json и логика авторизации
## Детали реализации
<!-- Здесь можно описать технические детали по пунктам. -->

## Check-List
<!-- После сохранения у следующих полей появятся галочки, которые нужно проставить мышкой -->
- [ ] Вы проверили свой код перед отправкой запроса?
- [ ] Вы написали тесты к реализованным функциям?
- [ ] Вы не забыли применить форматирование `black` и `isort` для _Back-End_ или `Prettier` для _Front-End_?



Diff:
diff --git a/dags/common/alert_tg/send_alert_pending_comments.py b/dags/common/alert_tg/send_alert_pending_comments.py
index 7c49ed4..daad394 100644
--- a/dags/common/alert_tg/send_alert_pending_comments.py
+++ b/dags/common/alert_tg/send_alert_pending_comments.py
@@ -42,7 +42,6 @@ def process_comments(last_run_ts, is_monday):
         if comments_to_send:
             send_comments("\n\n".join(comments_to_send))
             logging.info(f"Sent {len(comments_to_send)} new comments.")
-            
         payload["offset"] += BATCH_SIZE
 
     return total_today, total_unreviewed
diff --git a/dags/common/get_vds_balance.py b/dags/common/get_vds_balance.py
index f6f5f7f..27617d7 100644
--- a/dags/common/get_vds_balance.py
+++ b/dags/common/get_vds_balance.py
@@ -3,7 +3,7 @@
 from functools import partial
 
 import requests as r
-import certifi
+import urllib3
 from airflow import DAG
 from airflow.decorators import task
 from airflow.models import Variable
@@ -12,6 +12,7 @@
 
 
 ENVIRONMENT = Variable.get("_ENVIRONMENT")
+url = "https://my.vds.sh/manager/billmgr"
 
 
 @task(task_id="send_telegram_message", retries=3)
@@ -33,22 +34,39 @@ def send_telegram_message_or_print(chat_id, balance):
 
 @task(task_id="fetch_users", retries=3)
 def get_balance():
-    """Скачать данные из ЛК ОПК"""
+    """Скачать данные из ЛК VDS.sh"""
+    urllib3.disable_warnings()
 
-    with r.Session() as s:
+    with r.Session() as session:
         username = str(Variable.get("LK_VDSSH_ADMIN_USERNAME"))
         password = str(Variable.get("LK_VDSSH_ADMIN_PASSWORD"))
-        resp = s.get(
-            f"https://my.vds.sh/manager?out=sjson&func=auth&username={username}&password={password}",
-            verify=certifi.where(),
-        )
-        response_cookies = resp.cookies
-        resp = s.get(f"https://my.vds.sh/manager?out=sjson", cookies=response_cookies, verify=certifi.where())
-        logging.info(resp.json())
-        balance = resp.json()["doc"]["user"]["$balance"]
-        balance = float(balance)
 
-    return balance
+        session.get(url, verify=False)
+
+        login_data = {'func': 'auth', 'username': username, 'password': password}
+
+        auth_response = session.post(url, data=login_data, verify=False)
+        logging.info(f"Auth response status: {auth_response.status_code}")
+
+        try:
+            auth_json = auth_response.json()
+            if auth_json['doc']['$func'] == 'logon':
+                logging.error("Авторизация не удалась, все еще на странице входа")
+                return None
+        except Exception as e:
+            logging.info(f"Не удалось распарсить JSON ответа авторизации: {e}")
+
+        balance_params = {'func': 'desktop', 'startform': 'vds', 'out': 'xjson'}
+
+        balance_response = session.get(url, params=balance_params, verify=False)
+        logging.info(f"Balance response status: {balance_response.status_code}")
+        balance_data = balance_response.json()
+        balance = balance_data.get('doc', {}).get('user', {}).get('$balance', str())
+        if balance is None:
+            logging.info("Баланс не был получен")
+            raise ValueError
+
+        return balance
 
 
 with DAG(
diff --git a/dags/common/my.vds.crt b/dags/common/my.vds.crt
deleted file mode 100644
index b1ccd0a..0000000
--- a/dags/common/my.vds.crt
+++ /dev/null
@@ -1,30 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIFEzCCA/ugAwIBAgISBrkcFVtF2X4gpltURgj1kPDUMA0GCSqGSIb3DQEBCwUA
-MDMxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1MZXQncyBFbmNyeXB0MQwwCgYDVQQD
-EwNSMTEwHhcNMjUwNDE1MTAxNjMwWhcNMjUwNzE0MTAxNjI5WjAUMRIwEAYDVQQD
-EwlteS52ZHMuc2gwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCx9E+q
-pTrtBYacvfG5cFu16Fc8JTvaBV5kuanAs9lhzhOPqEuwO5nn0sixX9jKmqvNcWco
-9sb7sZKq3Nj/1A1cVtyxFVygXIwV0jybXL1cJAMprnHsPmC2ICNK4EADmUqg3jVl
-hpwox0Vmhm8155bQb5Zr5HuuS+qj5yu0BDEkJR7UnuD9xYcsBbvA3D3f/4Lg5ZSK
-XJU4T8WIk0hf5kw4hmNU8ZIOv8p7lOMeco1wfl5w9DlxAMgPuEAP362Lv9NIYRAc
-MwXHqMKzFa2JKr0GpU8wnv1w0YUGjoV7N5Qb9qv4iBetmPMyHBcCf2AgBv2gMwYl
-+shxfnOG7NZSz5tLAgMBAAGjggI+MIICOjAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0l
-BBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAwGA1UdEwEB/wQCMAAwHQYDVR0OBBYE
-FAdB9JsNnha80E55i8zulBXn+OaxMB8GA1UdIwQYMBaAFMXPRqTq9MPAemyVxC2w
-XpIvJuO5MFcGCCsGAQUFBwEBBEswSTAiBggrBgEFBQcwAYYWaHR0cDovL3IxMS5v
-LmxlbmNyLm9yZzAjBggrBgEFBQcwAoYXaHR0cDovL3IxMS5pLmxlbmNyLm9yZy8w
-FAYDVR0RBA0wC4IJbXkudmRzLnNoMBMGA1UdIAQMMAowCAYGZ4EMAQIBMC4GA1Ud
-HwQnMCUwI6AhoB+GHWh0dHA6Ly9yMTEuYy5sZW5jci5vcmcvODUuY3JsMIIBBQYK
-KwYBBAHWeQIEAgSB9gSB8wDxAHYAzPsPaoVxCWX+lZtTzumyfCLphVwNl422qX5U
-wP5MDbAAAAGWOSjb2AAABAMARzBFAiBTtTHE8mCYmXWR/U/tPK/Lq5fNMwQ+l1NF
-sZgtKwIM8wIhAPBz7lenDK1/JxEZUCUltNBWDoA+7e5mrrN0hnxTP1enAHcArxga
-KNaMo+CpikycZ6sJ+Lu8IrquvLE4o6Gd0/m2Aw0AAAGWOSjdawAABAMASDBGAiEA
-3L68Q3KbLJpOh3ylov6vQy32CVjNuNoMSFWHEQTVY4gCIQDiePWH21IzISmYMlYu
-+OrvWXF1xITzOL7skGLXH+z3qTANBgkqhkiG9w0BAQsFAAOCAQEAABq7tjIQjKZO
-IYYOawkhNdPXDpV4jZZVWFM1G6FOYQcKLKV36BIK3FC6TVR1P0XocnpuJjOzkE3w
-wc+1p80WuVTKT+tBVfJxyNXcNv1yuy/HBEC5dm4w/z+1kKIcu0aghAbiU6jVaTQj
-t0yKLIt7QSXvYCfnzM3tHS1w5Nk3l2bAOvJ0SSOc5ETSia7a3FUqqnE6JVT/Clu5
-Ei81QPqkAws5YZ4HYUbwIncBY2avrTPdq8osNC0ciA5DLynJ+qmFwbpj0EKGZtTw
-yrsbpsnHJ8eOfts81bXYzAHfTl7+Behi8O8fMML6XlWNiXX4Zn0Y8n5bsMF8qdku
-23B0s0KUAQ==
------END CERTIFICATE-----


Reviews:
user: login: parfenovma
state: APPROVED
author_association: CONTRIBUTOR
submitted_at: 2025-05-17T19:15:21Z
user: login: parfenovma
body: Че за нейро хлам
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-17T22:37:44Z
user: login: parfenovma
body: Нейро технологии везье
state: DISMISSED
author_association: CONTRIBUTOR
submitted_at: 2025-05-17T22:38:01Z
user: login: Temmmmmo
state: DISMISSED
author_association: MEMBER
submitted_at: 2025-05-17T22:39:11Z
user: login: MarkShidran
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-05-17T22:51:02Z
user: login: VladislavVoskoboinik
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-18T01:06:10Z
user: login: Temmmmmo
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-05-18T12:51:26Z
user: login: Temmmmmo
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-05-18T12:52:36Z
user: login: Temmmmmo
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-05-18T12:54:41Z
user: login: parfenovma
state: APPROVED
author_association: CONTRIBUTOR
submitted_at: 2025-05-20T05:26:18Z

Review comments:
diff_hunk: @@ -33,22 +33,37 @@ def send_telegram_message_or_print(chat_id, balance):
 
 @task(task_id="fetch_users", retries=3)
 def get_balance():
-    """Скачать данные из ЛК ОПК"""
+    """Скачать данные из ЛК VDS.sh"""
+    urllib3.disable_warnings()
 
-    with r.Session() as s:
+    with r.Session() as session:
         username = str(Variable.get("LK_VDSSH_ADMIN_USERNAME"))
         password = str(Variable.get("LK_VDSSH_ADMIN_PASSWORD"))
-        resp = s.get(
-            f"https://my.vds.sh/manager?out=sjson&func=auth&username={username}&password={password}",
-            verify=certifi.where(),
-        )
-        response_cookies = resp.cookies
-        resp = s.get(f"https://my.vds.sh/manager?out=sjson", cookies=response_cookies, verify=certifi.where())
-        logging.info(resp.json())
-        balance = resp.json()["doc"]["user"]["$balance"]
-        balance = float(balance)
 
-    return balance
+        url = "https://my.vds.sh/manager/billmgr"
+        session.get(url, verify=False)
+
+        login_data = {'func': 'auth', 'username': username, 'password': password}
+
+        auth_response = session.post(url, data=login_data, verify=False)
+        logging.info(f"Auth response status: {auth_response.status_code}")
+
+        try:
+            auth_json = auth_response.json()
+            if 'doc' in auth_json and '$func' in auth_json['doc'] and auth_json['doc']['$func'] == 'logon':
path: dags/common/get_vds_balance.py
user: login: Temmmmmo
body: А нахуя это
created_at: 2025-05-17T22:37:46Z
author_association: MEMBER
diff_hunk: @@ -33,22 +33,37 @@ def send_telegram_message_or_print(chat_id, balance):
 
 @task(task_id="fetch_users", retries=3)
 def get_balance():
-    """Скачать данные из ЛК ОПК"""
+    """Скачать данные из ЛК VDS.sh"""
+    urllib3.disable_warnings()
 
-    with r.Session() as s:
+    with r.Session() as session:
         username = str(Variable.get("LK_VDSSH_ADMIN_USERNAME"))
         password = str(Variable.get("LK_VDSSH_ADMIN_PASSWORD"))
-        resp = s.get(
-            f"https://my.vds.sh/manager?out=sjson&func=auth&username={username}&password={password}",
-            verify=certifi.where(),
-        )
-        response_cookies = resp.cookies
-        resp = s.get(f"https://my.vds.sh/manager?out=sjson", cookies=response_cookies, verify=certifi.where())
-        logging.info(resp.json())
-        balance = resp.json()["doc"]["user"]["$balance"]
-        balance = float(balance)
 
-    return balance
+        url = "https://my.vds.sh/manager/billmgr"
+        session.get(url, verify=False)
+
+        login_data = {'func': 'auth', 'username': username, 'password': password}
+
+        auth_response = session.post(url, data=login_data, verify=False)
+        logging.info(f"Auth response status: {auth_response.status_code}")
+
+        try:
+            auth_json = auth_response.json()
+            if 'doc' in auth_json and '$func' in auth_json['doc'] and auth_json['doc']['$func'] == 'logon':
+                logging.error("Авторизация не удалась, все еще на странице входа")
+                return None
path: dags/common/get_vds_balance.py
user: login: Temmmmmo
body: Э почему
created_at: 2025-05-17T22:38:34Z
author_association: MEMBER
diff_hunk: @@ -33,22 +33,37 @@ def send_telegram_message_or_print(chat_id, balance):
 
 @task(task_id="fetch_users", retries=3)
 def get_balance():
-    """Скачать данные из ЛК ОПК"""
+    """Скачать данные из ЛК VDS.sh"""
+    urllib3.disable_warnings()
 
-    with r.Session() as s:
+    with r.Session() as session:
         username = str(Variable.get("LK_VDSSH_ADMIN_USERNAME"))
         password = str(Variable.get("LK_VDSSH_ADMIN_PASSWORD"))
-        resp = s.get(
-            f"https://my.vds.sh/manager?out=sjson&func=auth&username={username}&password={password}",
-            verify=certifi.where(),
-        )
-        response_cookies = resp.cookies
-        resp = s.get(f"https://my.vds.sh/manager?out=sjson", cookies=response_cookies, verify=certifi.where())
-        logging.info(resp.json())
-        balance = resp.json()["doc"]["user"]["$balance"]
-        balance = float(balance)
 
-    return balance
+        url = "https://my.vds.sh/manager/billmgr"
+        session.get(url, verify=False)
+
+        login_data = {'func': 'auth', 'username': username, 'password': password}
+
+        auth_response = session.post(url, data=login_data, verify=False)
+        logging.info(f"Auth response status: {auth_response.status_code}")
+
+        try:
+            auth_json = auth_response.json()
+            if 'doc' in auth_json and '$func' in auth_json['doc'] and auth_json['doc']['$func'] == 'logon':
+                logging.error("Авторизация не удалась, все еще на странице входа")
+                return None
+        except Exception as e:
+            logging.info(f"Не удалось распарсить JSON ответа авторизации: {e}")
+
+        balance_params = {'func': 'desktop', 'startform': 'vds', 'out': 'xjson'}
+
+        balance_response = session.get(url, params=balance_params, verify=False)
+        logging.info(f"Balance response status: {balance_response.status_code}")
+        balance_data = balance_response.json()
+        balance = float(balance_data['doc']['user']['$balance'])
path: dags/common/get_vds_balance.py
user: login: Temmmmmo
body: А если не флот 
created_at: 2025-05-17T22:38:47Z
author_association: MEMBER
diff_hunk: @@ -33,22 +33,37 @@ def send_telegram_message_or_print(chat_id, balance):
 
 @task(task_id="fetch_users", retries=3)
 def get_balance():
-    """Скачать данные из ЛК ОПК"""
+    """Скачать данные из ЛК VDS.sh"""
+    urllib3.disable_warnings()
 
-    with r.Session() as s:
+    with r.Session() as session:
         username = str(Variable.get("LK_VDSSH_ADMIN_USERNAME"))
         password = str(Variable.get("LK_VDSSH_ADMIN_PASSWORD"))
-        resp = s.get(
-            f"https://my.vds.sh/manager?out=sjson&func=auth&username={username}&password={password}",
-            verify=certifi.where(),
-        )
-        response_cookies = resp.cookies
-        resp = s.get(f"https://my.vds.sh/manager?out=sjson", cookies=response_cookies, verify=certifi.where())
-        logging.info(resp.json())
-        balance = resp.json()["doc"]["user"]["$balance"]
-        balance = float(balance)
 
-    return balance
+        url = "https://my.vds.sh/manager/billmgr"
+        session.get(url, verify=False)
+
+        login_data = {'func': 'auth', 'username': username, 'password': password}
path: dags/common/get_vds_balance.py
user: login: Temmmmmo
body: Почему функ аутх
created_at: 2025-05-17T22:39:07Z
author_association: MEMBER
diff_hunk: @@ -3,7 +3,7 @@
 from functools import partial
path: dags/common/get_vds_balance.py
user: login: MarkShidran
body: С Днем Физика, бро!
created_at: 2025-05-17T22:50:42Z
author_association: MEMBER
diff_hunk: @@ -33,22 +33,37 @@ def send_telegram_message_or_print(chat_id, balance):
 
 @task(task_id="fetch_users", retries=3)
 def get_balance():
-    """Скачать данные из ЛК ОПК"""
+    """Скачать данные из ЛК VDS.sh"""
+    urllib3.disable_warnings()
 
-    with r.Session() as s:
+    with r.Session() as session:
         username = str(Variable.get("LK_VDSSH_ADMIN_USERNAME"))
         password = str(Variable.get("LK_VDSSH_ADMIN_PASSWORD"))
-        resp = s.get(
-            f"https://my.vds.sh/manager?out=sjson&func=auth&username={username}&password={password}",
-            verify=certifi.where(),
-        )
-        response_cookies = resp.cookies
-        resp = s.get(f"https://my.vds.sh/manager?out=sjson", cookies=response_cookies, verify=certifi.where())
-        logging.info(resp.json())
-        balance = resp.json()["doc"]["user"]["$balance"]
-        balance = float(balance)
 
-    return balance
+        url = "https://my.vds.sh/manager/billmgr"
+        session.get(url, verify=False)
+
+        login_data = {'func': 'auth', 'username': username, 'password': password}
+
+        auth_response = session.post(url, data=login_data, verify=False)
+        logging.info(f"Auth response status: {auth_response.status_code}")
+
+        try:
+            auth_json = auth_response.json()
+            if 'doc' in auth_json and '$func' in auth_json['doc'] and auth_json['doc']['$func'] == 'logon':
+                logging.error("Авторизация не удалась, все еще на странице входа")
+                return None
+        except Exception as e:
+            logging.info(f"Не удалось распарсить JSON ответа авторизации: {e}")
+
+        balance_params = {'func': 'desktop', 'startform': 'vds', 'out': 'xjson'}
+
+        balance_response = session.get(url, params=balance_params, verify=False)
+        logging.info(f"Balance response status: {balance_response.status_code}")
+        balance_data = balance_response.json()
+        balance = float(balance_data['doc']['user']['$balance'])
path: dags/common/get_vds_balance.py
user: login: VladislavVoskoboinik
body: ну и не инт
created_at: 2025-05-18T01:06:10Z
author_association: CONTRIBUTOR
diff_hunk: @@ -33,22 +33,37 @@ def send_telegram_message_or_print(chat_id, balance):
 
 @task(task_id="fetch_users", retries=3)
 def get_balance():
-    """Скачать данные из ЛК ОПК"""
+    """Скачать данные из ЛК VDS.sh"""
+    urllib3.disable_warnings()
 
-    with r.Session() as s:
+    with r.Session() as session:
         username = str(Variable.get("LK_VDSSH_ADMIN_USERNAME"))
         password = str(Variable.get("LK_VDSSH_ADMIN_PASSWORD"))
-        resp = s.get(
-            f"https://my.vds.sh/manager?out=sjson&func=auth&username={username}&password={password}",
-            verify=certifi.where(),
-        )
-        response_cookies = resp.cookies
-        resp = s.get(f"https://my.vds.sh/manager?out=sjson", cookies=response_cookies, verify=certifi.where())
-        logging.info(resp.json())
-        balance = resp.json()["doc"]["user"]["$balance"]
-        balance = float(balance)
 
-    return balance
+        url = "https://my.vds.sh/manager/billmgr"
path: dags/common/get_vds_balance.py
user: login: Temmmmmo
body: давай это в глобальную переменную вынесем
created_at: 2025-05-18T12:51:26Z
author_association: MEMBER
diff_hunk: @@ -33,22 +33,37 @@ def send_telegram_message_or_print(chat_id, balance):
 
 @task(task_id="fetch_users", retries=3)
 def get_balance():
-    """Скачать данные из ЛК ОПК"""
+    """Скачать данные из ЛК VDS.sh"""
+    urllib3.disable_warnings()
 
-    with r.Session() as s:
+    with r.Session() as session:
         username = str(Variable.get("LK_VDSSH_ADMIN_USERNAME"))
         password = str(Variable.get("LK_VDSSH_ADMIN_PASSWORD"))
-        resp = s.get(
-            f"https://my.vds.sh/manager?out=sjson&func=auth&username={username}&password={password}",
-            verify=certifi.where(),
-        )
-        response_cookies = resp.cookies
-        resp = s.get(f"https://my.vds.sh/manager?out=sjson", cookies=response_cookies, verify=certifi.where())
-        logging.info(resp.json())
-        balance = resp.json()["doc"]["user"]["$balance"]
-        balance = float(balance)
 
-    return balance
+        url = "https://my.vds.sh/manager/billmgr"
+        session.get(url, verify=False)
+
+        login_data = {'func': 'auth', 'username': username, 'password': password}
+
+        auth_response = session.post(url, data=login_data, verify=False)
+        logging.info(f"Auth response status: {auth_response.status_code}")
+
+        try:
+            auth_json = auth_response.json()
+            if 'doc' in auth_json and '$func' in auth_json['doc'] and auth_json['doc']['$func'] == 'logon':
path: dags/common/get_vds_balance.py
user: login: Temmmmmo
body: мне кажется, что эту проверку можно сделать проще
created_at: 2025-05-18T12:52:36Z
author_association: MEMBER
diff_hunk: @@ -33,22 +33,37 @@ def send_telegram_message_or_print(chat_id, balance):
 
 @task(task_id="fetch_users", retries=3)
 def get_balance():
-    """Скачать данные из ЛК ОПК"""
+    """Скачать данные из ЛК VDS.sh"""
+    urllib3.disable_warnings()
 
-    with r.Session() as s:
+    with r.Session() as session:
         username = str(Variable.get("LK_VDSSH_ADMIN_USERNAME"))
         password = str(Variable.get("LK_VDSSH_ADMIN_PASSWORD"))
-        resp = s.get(
-            f"https://my.vds.sh/manager?out=sjson&func=auth&username={username}&password={password}",
-            verify=certifi.where(),
-        )
-        response_cookies = resp.cookies
-        resp = s.get(f"https://my.vds.sh/manager?out=sjson", cookies=response_cookies, verify=certifi.where())
-        logging.info(resp.json())
-        balance = resp.json()["doc"]["user"]["$balance"]
-        balance = float(balance)
 
-    return balance
+        url = "https://my.vds.sh/manager/billmgr"
+        session.get(url, verify=False)
+
+        login_data = {'func': 'auth', 'username': username, 'password': password}
+
+        auth_response = session.post(url, data=login_data, verify=False)
+        logging.info(f"Auth response status: {auth_response.status_code}")
+
+        try:
+            auth_json = auth_response.json()
+            if 'doc' in auth_json and '$func' in auth_json['doc'] and auth_json['doc']['$func'] == 'logon':
+                logging.error("Авторизация не удалась, все еще на странице входа")
+                return None
+        except Exception as e:
+            logging.info(f"Не удалось распарсить JSON ответа авторизации: {e}")
+
+        balance_params = {'func': 'desktop', 'startform': 'vds', 'out': 'xjson'}
+
+        balance_response = session.get(url, params=balance_params, verify=False)
+        logging.info(f"Balance response status: {balance_response.status_code}")
+        balance_data = balance_response.json()
+        balance = float(balance_data['doc']['user']['$balance'])
path: dags/common/get_vds_balance.py
user: login: Temmmmmo
body: ```python
balance = balance_data.get('doc', {}).get('user', {}).get('$balance')
if balance is None:
    raise ...
return balance
```
created_at: 2025-05-18T12:54:41Z
author_association: MEMBER

PR comments:
user: login: github-actions[bot]
created_at: 2025-05-17T12:45:46Z
body: :poop: Code linting failed, use `black` and `isort` to fix it.
author_association: NONE
user: login: github-actions[bot]
created_at: 2025-05-17T13:52:06Z
body: :poop: Code linting failed, use `black` and `isort` to fix it.
author_association: NONE
user: login: Temmmmmo
created_at: 2025-05-18T12:24:14Z
body: Хороший рефакторинг! Код стал чище и прозрачнее, добавлены проверки ошибок при авторизации и логирование статусов. Появился явный переход на POST-запрос для логина, что безопаснее. Рекомендую рассмотреть обработку ошибок при получении баланса (balance_response) и подумать над вариантом работы с сертификатами вместо verify=False.
author_association: MEMBER
user: login: VladislavVoskoboinik
created_at: 2025-05-18T12:48:30Z
body: > Хороший рефакторинг! Код стал чище и прозрачнее, добавлены проверки ошибок при авторизации и логирование статусов. Появился явный переход на POST-запрос для логина, что безопаснее. Рекомендую рассмотреть обработку ошибок при получении баланса (balance_response) и подумать над вариантом работы с сертификатами вместо verify=False.


Большое спасибо за детальный разбор и ценные рекомендации! Принял к сведению ваши замечания и планирую внести следующие улучшения:
1. Обработка ошибок при получении баланса
2. Работа с SSL-сертификатами

author_association: CONTRIBUTOR
user: login: github-actions[bot]
created_at: 2025-05-19T15:30:27Z
body: :poop: Code linting failed, use `black` and `isort` to fix it.
author_association: NONE
user: login: parfenovma
created_at: 2025-05-20T05:26:55Z
body: поправь линтинг только)
author_association: CONTRIBUTOR
user: login: VladislavVoskoboinik
created_at: 2025-05-20T05:28:05Z
body: > поправь линтинг только)

Ща до уника доберусь, сделаю
author_association: CONTRIBUTOR