From 527ca8dff4fe18be53e5216f27a0d8251bdb44be Mon Sep 17 00:00:00 2001 From: dosangyoon Date: Tue, 31 Aug 2021 04:08:05 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B2=BD=EB=A1=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- stockpredictor/analysis/Analyzer.py | 3 ++- stockpredictor/crawler/toSQLite/Crawler.py | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/stockpredictor/analysis/Analyzer.py b/stockpredictor/analysis/Analyzer.py index 860daf9..3351872 100644 --- a/stockpredictor/analysis/Analyzer.py +++ b/stockpredictor/analysis/Analyzer.py @@ -577,7 +577,8 @@ class Analyzer: if __name__ == "__main__": start = time.time() - PROJECT_HOME = "../.." + PROJECT_HOME = os.path.join(os.path.dirname(os.path.join(os.path.dirname(os.path.join(os.path.dirname(__file__)))))) + inFileName = PROJECT_HOME + '/resources/stock.db' inFnguideFileName = PROJECT_HOME + '/resources/fnguide.db' analyzer = Analyzer(PROJECT_HOME, inFileName, inFnguideFileName) diff --git a/stockpredictor/crawler/toSQLite/Crawler.py b/stockpredictor/crawler/toSQLite/Crawler.py index 6e2f350..85e1dd8 100644 --- a/stockpredictor/crawler/toSQLite/Crawler.py +++ b/stockpredictor/crawler/toSQLite/Crawler.py @@ -2,7 +2,7 @@ import os import shutil import datetime import time - +import sys from stockpredictor.crawler.toSQLite.MetaCrawler import MetaCrawler from stockpredictor.crawler.toSQLite.StockCrawler import StockCrawler from stockpredictor.crawler.toSQLite.FnGuideCrawler import FnGuideCrawler @@ -12,7 +12,8 @@ today = datetime.datetime.now().strftime("%Y-%m-%d") # DB Browser for SQLite: http://hleecaster.com/python-sqlite3/ -PROJECT_HOME = "../../.." +PROJECT_HOME = os.path.join(os.path.dirname(os.path.join(os.path.dirname(os.path.join(os.path.dirname(os.path.join(os.path.dirname(__file__)))))))) + start = time.time() inFnguideFileName = PROJECT_HOME + '/resources/fnguide.db'