seawolf2357 commited on
Commit
38b8df6
ยท
verified ยท
1 Parent(s): 3476805

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
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
- main_content = soup.find('div', class_='main-content')
 
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 = ""