Skip to content

Commit 6799eb5

Browse files
committed
fix: 반복 작업 수정
1 parent 19c74c6 commit 6799eb5

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

crawling/koreatech_article/convert_content.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def connect_db():
1919

2020
def convert_content_to_url(connection):
2121
cur = connection.cursor()
22-
batch_size = 500
22+
batch_size = 5
2323
last_id = 0
2424
total_articles = 0
2525

@@ -56,8 +56,7 @@ def convert_content_to_url(connection):
5656

5757
total_articles += 1
5858

59-
last_id = articles[-1]['id']
60-
59+
last_id = articles[-1][0]
6160
connection.commit()
6261

6362
except Exception as error:

0 commit comments

Comments
 (0)