Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -45,11 +45,10 @@ def get_blog_content(link):
|
|
45 |
driver = webdriver.Chrome(options=options)
|
46 |
driver.get(link)
|
47 |
soup = BeautifulSoup(driver.page_source, "html.parser")
|
48 |
-
title =
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
title = "제목 없음"
|
53 |
return title
|
54 |
|
55 |
with gr.Interface(
|
|
|
45 |
driver = webdriver.Chrome(options=options)
|
46 |
driver.get(link)
|
47 |
soup = BeautifulSoup(driver.page_source, "html.parser")
|
48 |
+
title = ""
|
49 |
+
for component in soup.find_all("div", class_="se-component se-text se-l-default"):
|
50 |
+
for paragraph in component.find_all("p", class_="se-text-paragraph"):
|
51 |
+
title += paragraph.text.strip() + "\n"
|
|
|
52 |
return title
|
53 |
|
54 |
with gr.Interface(
|