This commit is contained in:
dsyoon
2023-12-20 16:00:23 +09:00
parent 7b830a9a87
commit a7d42067f0
2 changed files with 2 additions and 3 deletions

View File

@@ -64,11 +64,10 @@ if __name__ == "__main__":
time.sleep(60) time.sleep(60)
db_filename = os.path.join(RESOURCE_PATH, "hts.db") db_filename = os.path.join(RESOURCE_PATH, "hts.db")
for stock in stocks: for stock in stocks:
hts.insertStockData(today, stock['stock_code'], stock['stock_name']) hts.insertStockData(today, stock['stock_code'], stock['stock_name'])
hts.bot.sendMsg("done... {} ({})".format(stock['stock_code'], stock['stock_name']))
hts.disconnect() hts.disconnect()
hts.bot.sendMsg("done...")
print("done...") print("done...")

View File

@@ -481,7 +481,7 @@ class HTS:
create_key = "CREATE INDEX IF NOT EXISTS hts_idx on hts(CODE, ymd, hms) " create_key = "CREATE INDEX IF NOT EXISTS hts_idx on hts(CODE, ymd, hms) "
self.cursor.execute(create_key) self.cursor.execute(create_key)
items = self.getStockInfo(stock_code, this_day.strftime('%Y%m%d')) items = self.getStockInfo(stock_code, this_day)
for item in items: for item in items:
ymd = item[0] ymd = item[0]