From 1c2925c66005c9762b78b857589b6a6e223bcb34 Mon Sep 17 00:00:00 2001 From: minyoung347 Date: Fri, 17 May 2019 22:07:59 +0900 Subject: [PATCH] parser headline update --- korea_news_crawler/articleparser.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/korea_news_crawler/articleparser.py b/korea_news_crawler/articleparser.py index e465ff5..fd94c21 100644 --- a/korea_news_crawler/articleparser.py +++ b/korea_news_crawler/articleparser.py @@ -25,7 +25,8 @@ def clear_content(self, text): def clear_headline(self, text): # 기사 제목에서 필요없는 특수문자들을 지움 - special_symbol_removed_headline = re.sub(self.special_symbol, '', text) + newline_symbol_removed_text = text.replace('\\n', '').replace('\\t', '') + special_symbol_removed_headline = re.sub(self.special_symbol, '', newline_symbol_removed_text) return special_symbol_removed_headline def find_news_totalpage(self, url):