Skip to content

Commit b2e1a0b

Browse files
committed
fix: emoji 코드 삭제
1 parent 868b198 commit b2e1a0b

1 file changed

Lines changed: 0 additions & 6 deletions

File tree

crawling/koreatech_article/article.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
from config import MYSQL_CONFIG
44
from config import BATCH_CONFIG
55

6-
from emoji import core
76
import requests
87
from bs4 import BeautifulSoup, Comment
98
import urllib3
@@ -403,17 +402,12 @@ def update_db(articles):
403402
cur = connection.cursor()
404403

405404
for article in articles:
406-
article.title = core.replace_emoji(article.title, replace='')
407405
article.title = article.title.replace("'", """''""") # sql문에서 작은따옴표 이스케이프 처리
408406

409-
article.content = core.replace_emoji(article.content, replace='')
410407
article.content = article.content.replace("'", """''""") # sql문에서 작은따옴표 이스케이프 처리
411408

412409
article.author = core.replace_emoji(article.author, replace='')
413410

414-
for attachment in article.attachment:
415-
attachment.name = core.replace_emoji(attachment.name, replace='')
416-
417411
article.registered_at = parser.parse(article.registered_at).strftime("%Y-%m-%d %H:%M:%S")
418412

419413
try:

0 commit comments

Comments
 (0)