Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -93,10 +93,10 @@ def get_comments(news_url):
|
|
93 |
soup = BeautifulSoup(response.text, "html.parser")
|
94 |
|
95 |
# 제목 추출
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
# 본문 추출
|
101 |
content = article_soup.select_one("#dic_area")
|
102 |
if content is None:
|
|
|
93 |
soup = BeautifulSoup(response.text, "html.parser")
|
94 |
|
95 |
# 제목 추출
|
96 |
+
title = article_soup.select_one("#ct > div.media_end_head.go_trans > div.media_end_head_title > h2")
|
97 |
+
if title is None:
|
98 |
+
title = article_soup.select_one("#content > div.end_ct > div > h2")
|
99 |
+
|
100 |
# 본문 추출
|
101 |
content = article_soup.select_one("#dic_area")
|
102 |
if content is None:
|