init
This commit is contained in:
@@ -185,8 +185,6 @@ class StockCrawler:
|
||||
|
||||
item_name = item[0]
|
||||
item_code = item[1]
|
||||
print(idx, item_name, item_code, (time.time()-start_time),"s")
|
||||
start_time = time.time()
|
||||
|
||||
cursor.execute('SELECT * FROM ' + tableName + ' WHERE CODE=?', (item_code,))
|
||||
result = cursor.fetchone()
|
||||
@@ -197,6 +195,9 @@ class StockCrawler:
|
||||
self.crawl_specific_stock(stock)
|
||||
text = json.dumps(stock['PRICE'], ensure_ascii=False)
|
||||
|
||||
print(idx, item_name, item_code, (time.time()-start_time),"s")
|
||||
start_time = time.time()
|
||||
|
||||
cursor.execute('SELECT * FROM ' + tableName + ' WHERE CODE=?', (stock["CODE"],))
|
||||
result = cursor.fetchone()
|
||||
if result == None:
|
||||
|
||||
Reference in New Issue
Block a user