This commit is contained in:
dsyoon
2023-03-08 22:05:17 +09:00
parent a9a9bc2f40
commit ad1e0fe959

View File

@@ -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...")