Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Youmoo/stocks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

1 Commit

Repository files navigation

stocks

从雪球爬取当天股票数据到本地.

历史数据备份(从2018年05月09日至今): https://pan.baidu.com/s/1XwPavD-osWqZW9aEjGCz4w 密码: sqpe

# 安装
git clone https://github.com/Youmoo/stocks.git
cd stocks
npm i
# 测试(node v10.0.0)
npm test
# 运行
npm start

爬取的数据默认保存到~/stock_history目录下,可根据环境变量STOCK_DIR重新配置.

如果需要将数据导入到mongodb中进行分析,执行以下命令(适用于Mac)

# 安装jq
brew install jq
# 格式化数据并导入到mongodb
cd ~/stock_history
for i in *
 if [ -d $i ];then
 jq --arg date $i '. + {date:$date}' $i/*.json|jq -s -c .\
 |mongoimport --jsonArray --db logically --collection stocks
fi

About

雪球A股历史数据

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

Contributors

AltStyle によって変換されたページ (->オリジナル) /