init
This commit is contained in:
@@ -32,8 +32,11 @@ week = datetime.today().weekday()
|
||||
|
||||
slackBot = SlackBot()
|
||||
|
||||
error_count = 0
|
||||
if week in (0, 1, 2, 3, 4): # 0:월, 1:화, 2:수, 3:목, 4:금, 5:토, 6:일
|
||||
|
||||
while error_count < 3:
|
||||
try:
|
||||
# 재무제표는 3개월마다 다운로드를 한다.
|
||||
fnGuideCrawler = FnGuideCrawler(START_DATE)
|
||||
print("[KOSPI 상장기업 재무제표 다운로드]")
|
||||
@@ -95,6 +98,9 @@ if week in (0, 1, 2, 3, 4): # 0:월, 1:화, 2:수, 3:목, 4:금, 5:토, 6:일
|
||||
stockStatus.findCandidates(outPath)
|
||||
|
||||
slackBot.sendMsg("Done. Crawling...")
|
||||
except:
|
||||
error_count += 1
|
||||
continue
|
||||
|
||||
print("time : %6.2f 초", (time.time() - start))
|
||||
print ("done...")
|
||||
|
||||
Reference in New Issue
Block a user