diff --git a/hts/HTS.py b/hts/HTS.py index 69eda86..402ac56 100644 --- a/hts/HTS.py +++ b/hts/HTS.py @@ -489,12 +489,7 @@ class HTS: idx += 1 cursor.execute('DELETE FROM ' + tableName + ' WHERE CODE=? and ymd=? and hms=?', (stock_code, ymd, hms,)) - cursor.execute('SELECT * FROM ' + tableName + ' WHERE CODE=? and ymd=? and hms=?', (stock_code, ymd, hms,)) - result = cursor.fetchone() - if result == None: - cursor.execute( - "INSERT INTO " + tableName + "(CODE, NAME, ymd, hms, close, open, high, low, volume) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?)", - (stock_code, stock_name, ymd, hms, close, open, high, low, volume)) + cursor.execute("INSERT INTO " + tableName + "(CODE, NAME, ymd, hms, close, open, high, low, volume) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?)", (stock_code, stock_name, ymd, hms, close, open, high, low, volume)) conn.commit() cursor.close() diff --git a/resources/hts.db b/resources/hts.db index d98fb3d..61fe4a2 100644 Binary files a/resources/hts.db and b/resources/hts.db differ