Update app.py
Browse files
app.py
CHANGED
@@ -76,7 +76,13 @@ def crawl_chats(vod_url):
|
|
76 |
chat_logs.append(f"{formatted_time} - {chat_content}")
|
77 |
|
78 |
# μκ°λλ³λ‘ μ±ν
κ°μ κ³μ°
|
79 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
minute_key = time_obj.replace(second=0) # λΆ λ¨μλ‘ λ³ννμ¬ μ§κ³
|
81 |
chat_counts[minute_key] += 1
|
82 |
|
|
|
76 |
chat_logs.append(f"{formatted_time} - {chat_content}")
|
77 |
|
78 |
# μκ°λλ³λ‘ μ±ν
κ°μ κ³μ°
|
79 |
+
try:
|
80 |
+
# HH:MM:SS νμμΌ κ²½μ° μ²λ¦¬
|
81 |
+
time_obj = datetime.datetime.strptime(formatted_time, '%H:%M:%S')
|
82 |
+
except ValueError:
|
83 |
+
# MM:SS νμμΌ κ²½μ° μ²λ¦¬
|
84 |
+
time_obj = datetime.datetime.strptime(formatted_time, '%M:%S')
|
85 |
+
|
86 |
minute_key = time_obj.replace(second=0) # λΆ λ¨μλ‘ λ³ννμ¬ μ§κ³
|
87 |
chat_counts[minute_key] += 1
|
88 |
|