This commit is contained in:
dsyoon
2022-08-05 00:06:16 +09:00
parent 210537415b
commit a561c8dfd5
2 changed files with 3 additions and 2 deletions

View File

@@ -338,7 +338,7 @@ class StockCrawler:
continue
stock_data.append({
'CODE':item_code, 'NAME':us_stocks[item_code], 'ymd': ymd.strftime('%Y.%m.%d'),
'CODE':item_code, 'NAME':special_stocks[item_code], 'ymd': ymd.strftime('%Y.%m.%d'),
'close': round(stock['close'][ymd], 2), 'diff': round(diff, 2), 'open': round(stock['open'][ymd], 2),
'high': round(stock['high'][ymd], 2), 'low': round(stock['low'][ymd], 2), 'volume': stock['volume'][ymd]
})
@@ -358,7 +358,7 @@ class StockCrawler:
conn.commit()
cursor.close()
conn.close()
print(idx, item_code, us_stocks[item_code], (time.time() - start_time), "s")
print(idx, item_code, special_stocks[item_code], (time.time() - start_time), "s")
start_time = time.time()
sleep(0.05)