Compare commits

...

1 Commits
v1.0.5 ... main

Author SHA1 Message Date
1708639776959.sdtroot 7d054dd291 Update main.py 2025-02-18 23:13:17 +00:00
1 changed files with 3 additions and 3 deletions

View File

@ -25,9 +25,9 @@ def main():
while True:
data = extract_data(items[index])
if data:
msg = json.dumps(data, ensure_ascii=False, default=str)
sdtcloudMqttClient.pubMessage(msg)
print(f"{time.strftime('%Y-%m-%d %H:%M:%S')} Extracted data:{msg}")
# msg = json.dumps(data, ensure_ascii=False, default=str)
sdtcloudMqttClient.pubMessage(data)
print(f"{time.strftime('%Y-%m-%d %H:%M:%S')} Extracted data:{data}")
else:
print("No 'data' key found in the JSON item.")