Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -23,14 +23,17 @@ def gradio_fetch_and_parse(url):
|
|
23 |
|
24 |
def get_main_content(html_content):
|
25 |
soup = BeautifulSoup(html_content, 'html.parser')
|
26 |
-
|
|
|
27 |
if main_content:
|
28 |
text = main_content.get_text(strip=True)
|
29 |
print("์ถ์ถ๋ ํ
์คํธ:", text) # ๋๋ฒ๊น
์ ์ํ ๋ก๊ทธ
|
30 |
return text
|
31 |
else:
|
|
|
32 |
return ''
|
33 |
|
|
|
34 |
def format_script(text):
|
35 |
sentences = text.split('.')
|
36 |
script = ""
|
|
|
23 |
|
24 |
def get_main_content(html_content):
|
25 |
soup = BeautifulSoup(html_content, 'html.parser')
|
26 |
+
# ์์ ๋ ์ ํ์ ์์
|
27 |
+
main_content = soup.find('div', class_='content')
|
28 |
if main_content:
|
29 |
text = main_content.get_text(strip=True)
|
30 |
print("์ถ์ถ๋ ํ
์คํธ:", text) # ๋๋ฒ๊น
์ ์ํ ๋ก๊ทธ
|
31 |
return text
|
32 |
else:
|
33 |
+
print("๋ณธ๋ฌธ ์ฝํ
์ธ ๋ฅผ ์ฐพ์ ์ ์์ต๋๋ค.")
|
34 |
return ''
|
35 |
|
36 |
+
|
37 |
def format_script(text):
|
38 |
sentences = text.split('.')
|
39 |
script = ""
|