Update app.py
Browse files
app.py
CHANGED
@@ -9,7 +9,6 @@ st.write("VOD URL์ ์
๋ ฅํ๊ณ ์ฑํ
๋ฐ์ดํฐ๋ฅผ ํฌ๋กค๋งํฉ๋๋ค.")
|
|
9 |
# URL ์
๋ ฅ ๋ฐ๊ธฐ
|
10 |
vod_url = st.text_input("VOD URL ์
๋ ฅ")
|
11 |
|
12 |
-
|
13 |
# ์ฑํ
ํฌ๋กค๋ง ํจ์
|
14 |
def crawl_chats(vod_url):
|
15 |
# URL ์ค์
|
@@ -92,13 +91,12 @@ def crawl_chats(vod_url):
|
|
92 |
# ๊ฒฐ๊ณผ ๋ฐํ
|
93 |
return "\n".join(chat_logs)
|
94 |
|
95 |
-
|
96 |
# ๋ฒํผ์ ๋๋ ์ ๋ ์ฑํ
ํฌ๋กค๋ง ์์
|
97 |
if st.button("ํฌ๋กค๋ง ์์"):
|
98 |
if vod_url:
|
99 |
chat_logs = crawl_chats(vod_url)
|
100 |
st.text_area("์ฑํ
๋ก๊ทธ", value=chat_logs, height=400)
|
101 |
-
|
102 |
# ํ์ผ๋ก ์ ์ฅ
|
103 |
file_name = "chat_logs.txt"
|
104 |
with open(file_name, "w") as file:
|
|
|
9 |
# URL ์
๋ ฅ ๋ฐ๊ธฐ
|
10 |
vod_url = st.text_input("VOD URL ์
๋ ฅ")
|
11 |
|
|
|
12 |
# ์ฑํ
ํฌ๋กค๋ง ํจ์
|
13 |
def crawl_chats(vod_url):
|
14 |
# URL ์ค์
|
|
|
91 |
# ๊ฒฐ๊ณผ ๋ฐํ
|
92 |
return "\n".join(chat_logs)
|
93 |
|
|
|
94 |
# ๋ฒํผ์ ๋๋ ์ ๋ ์ฑํ
ํฌ๋กค๋ง ์์
|
95 |
if st.button("ํฌ๋กค๋ง ์์"):
|
96 |
if vod_url:
|
97 |
chat_logs = crawl_chats(vod_url)
|
98 |
st.text_area("์ฑํ
๋ก๊ทธ", value=chat_logs, height=400)
|
99 |
+
|
100 |
# ํ์ผ๋ก ์ ์ฅ
|
101 |
file_name = "chat_logs.txt"
|
102 |
with open(file_name, "w") as file:
|