diff --git a/HTS_stocks.py b/HTS_stocks.py index a323427..7c93ac7 100644 --- a/HTS_stocks.py +++ b/HTS_stocks.py @@ -85,8 +85,8 @@ class HTS_Stocks (HTS): def getCompanyInfo(self): - self.cursor.execute('SELECT distinct code, name FROM stock order by code') - all_stocks = self.cursor.fetchall() + self.cursor_stock.execute('SELECT distinct code, name FROM stock order by code') + all_stocks = self.cursor_stock.fetchall() valid_company = set() self.cursor_stock.execute('select CODE, NAME, max(ymd) as ymd from fnguide where type != "E" group by 1 order by total_assets desc')