1 Star 0 Fork 14

张九经/stock_robot

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
collect.py 610 Bytes
一键复制 编辑 原始数据 按行查看 历史
邹吉华 提交于 2023-04-12 16:27 . 1.6
from data_center import DataCenter
def _collect_stock(data_center,code):
start_date = data_center.get_start_date(code)
if start_date is None :
start_date = "1997-01-01"
stock_info = data_center.query_stock_info(code,start_date)
if stock_info is not None:
data_center.save_stock_info(code,stock_info)
def collect_data(date="2022-07-18"):
data_center = DataCenter()
all_stock = data_center.query_all_stock(date)
for i in range(len(all_stock)):
print(f"collect stock : {all_stock[i]},{i}/{len(all_stock)}")
_collect_stock(all_stock[i])
collect_data()
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/StepZ/stock_robot.git
[email protected]:StepZ/stock_robot.git
StepZ
stock_robot
stock_robot
master

搜索帮助