From 19c74c6aa2c96350e6deddc0be89f3278bd1c75b Mon Sep 17 00:00:00 2001 From: Choon0414 Date: Tue, 16 Sep 2025 09:51:34 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EB=B0=98=EB=B3=B5=20=EC=9E=91=EC=97=85?= =?UTF-8?q?=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crawling/koreatech_article/convert_content.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/crawling/koreatech_article/convert_content.py b/crawling/koreatech_article/convert_content.py index 95e344f..f4ba3f3 100644 --- a/crawling/koreatech_article/convert_content.py +++ b/crawling/koreatech_article/convert_content.py @@ -23,8 +23,8 @@ def convert_content_to_url(connection): last_id = 0 total_articles = 0 - while True: - try: + try: + while True: cur.execute(""" SELECT `id`, `board_id`, `content` FROM `new_articles` @@ -60,12 +60,12 @@ def convert_content_to_url(connection): connection.commit() - except Exception as error: - connection.rollback() - print(error) - finally: - cur.close() - print(f"total articles: {total_articles}") + except Exception as error: + connection.rollback() + print(error) + finally: + cur.close() + print(f"total articles: {total_articles}") if __name__ == "__main__":