МБА
This commit is contained in:
10
timer_MBA.py
10
timer_MBA.py
@@ -49,7 +49,7 @@ def seconds(data):
|
||||
return "" if temp == "0.0" else temp if temp != "5.0" else "5"
|
||||
|
||||
def parse2(data):
|
||||
# print(data)
|
||||
# print("+", "_".join(data), len(data))
|
||||
timer = data[2:7].strip().replace("\x00","").replace('/', '')
|
||||
if ":" in timer:
|
||||
timer = f'{int(timer.split(":")[0])}:{timer.split(":")[1]}'
|
||||
@@ -67,9 +67,9 @@ def parse2(data):
|
||||
|
||||
|
||||
def read_logs():
|
||||
with open("logs_mba_1.txt", "r") as file:
|
||||
with open(r"C:\Users\soule\Downloads\Telegram Desktop\LOGS\LOGS\timer_MBA_2026-01-04_14-16-13.log", "r", encoding="utf-8") as file:
|
||||
for line in file:
|
||||
parts = line.strip().split("] ")
|
||||
parts = line.strip().split("INFO:root:")
|
||||
if len(parts) == 2:
|
||||
timestamp = parts[0][1:]
|
||||
data = parts[1]
|
||||
@@ -79,7 +79,7 @@ def read_logs():
|
||||
# if len(eval(data)) > 30 and eval(data)[-7] == "00":
|
||||
# time.sleep(.1)
|
||||
# else:
|
||||
# time.sleep(1)
|
||||
time.sleep(.5)
|
||||
|
||||
|
||||
def main():
|
||||
@@ -101,7 +101,7 @@ def main():
|
||||
data = tcp_socket.recv(1024)
|
||||
# print(data)
|
||||
# data = data.decode("utf-8", errors="ignore")
|
||||
data = data.decode("utf-8", errors="ignore").strip()
|
||||
data = data.decode("utf-8", errors="ignore")
|
||||
|
||||
# print(data)
|
||||
logging.info(data)
|
||||
|
||||
Reference in New Issue
Block a user