diff --git a/HTS_etf_all.py b/HTS_etf_all.py index 61dc23b..52cfb05 100644 --- a/HTS_etf_all.py +++ b/HTS_etf_all.py @@ -64,11 +64,10 @@ if __name__ == "__main__": time.sleep(60) - db_filename = os.path.join(RESOURCE_PATH, "hts.db") for stock in stocks: hts.insertStockData(today, stock['stock_code'], stock['stock_name']) - hts.bot.sendMsg("done... {} ({})".format(stock['stock_code'], stock['stock_name'])) hts.disconnect() + hts.bot.sendMsg("done...") print("done...") \ No newline at end of file diff --git a/hts/HTS.py b/hts/HTS.py index 391591d..d080f91 100644 --- a/hts/HTS.py +++ b/hts/HTS.py @@ -481,7 +481,7 @@ class HTS: create_key = "CREATE INDEX IF NOT EXISTS hts_idx on hts(CODE, ymd, hms) " 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: ymd = item[0]