From 682138a8aef1eaa435bf02689044896f09742429 Mon Sep 17 00:00:00 2001 From: dsyoon Date: Sun, 3 Sep 2023 10:29:03 +0900 Subject: [PATCH] init --- stock/analysis/AnalyzerSqlite.py | 17 +++++++++-------- stock/crawler/StockCrawler.py | 2 +- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/stock/analysis/AnalyzerSqlite.py b/stock/analysis/AnalyzerSqlite.py index 6a4bc53..7afad38 100644 --- a/stock/analysis/AnalyzerSqlite.py +++ b/stock/analysis/AnalyzerSqlite.py @@ -311,7 +311,7 @@ class AnalyzerSqlite: fig['layout'].update(title=title) fileName = self.outPath + "/" + dir_name - fileName = "%s/%s %s %s %s %s.html" % (fileName, datetime.today().strftime("%Y%m%d"), state, NAME.replace(" ", ""), CODE, top) + fileName = "%s/%s_%s_%s_%s_%s.html" % (fileName, datetime.today().strftime("%Y%m%d"), top, state, NAME.replace(" ", ""), CODE) po.write_html(fig, file=fileName, auto_open=False) return @@ -440,29 +440,29 @@ class AnalyzerSqlite: shutil.rmtree(outPath) os.mkdir(outPath) - self.makeDir("monthly_env_하단_rsi_50") self.makeDir("monthly_env_상단_volume") - self.makeDir("monthly_BB하단_내려옴") + self.makeDir("monthly_env_하단_rsi_50") self.makeDir("monthly_5월선_돌파") self.makeDir("monthly_5월선_20월선_돌파") self.makeDir("monthly_20월선_60월선_돌파") + # self.makeDir("monthly_BB하단_내려옴") - #self.makeDir("weekly_env_상단_volume") - self.makeDir("weekly_이격도") self.makeDir("weekly_BB하단_내려옴") self.makeDir("weekly_5주선_돌파") self.makeDir("weekly_5주선_20주선_돌파") self.makeDir("weekly_20주선_60주선_돌파") + #self.makeDir("weekly_env_상단_volume") + #self.makeDir("weekly_이격도") - #self.makeDir("daily_env_상단_volume") self.makeDir("daily_이전에_없던_거래량") - self.makeDir("daily_이격도") self.makeDir("daily_5일선_돌파") self.makeDir("daily_5일선_20일선_돌파") self.makeDir("daily_20일선_60일선_돌파") #self.makeDir("daily_OBV") #self.makeDir("daily_EV하단_내려옴") #self.makeDir("daily_BB하단_내려옴") + #self.makeDir("daily_env_상단_volume") + #self.makeDir("daily_이격도") return @@ -526,13 +526,14 @@ class AnalyzerSqlite: log = "RSI_" + "{:.2f}".format(stock_monthly['rsi'][0]) self.writeFile(dir_name, CODE, NAME, top, stock_monthly, log) + """ # 볼린저 밴드 하단 아래 check = self.common.check_under_BB_Low(stock_monthly) if check: dir_name = "monthly_BB하단_내려옴" log = "BB_" + str(top) self.writeFile(dir_name, CODE, NAME, top, stock_monthly, log) - + """ # monthly_5월선_돌파 check = self.common.check_5_moving_line(stock_monthly) if check: diff --git a/stock/crawler/StockCrawler.py b/stock/crawler/StockCrawler.py index 921395b..b098aca 100644 --- a/stock/crawler/StockCrawler.py +++ b/stock/crawler/StockCrawler.py @@ -142,7 +142,7 @@ class StockCrawler: if result is not None: ymd = result[0] - stock_data = self.crawl_specific_stock(stock["CODE"], ymd, ".KS") + stock_data = self.crawl_specific_stock(stock["CODE"], ymd) for item in stock_data: