1、安装tushare
pip install tushare
pip install pandas
2、获得股票信息
import tushare
import pandas
import datetime
get_message =tushare.get_stock_basics()
tickers =get_message.index.tolist()
# 获得今日所有股票信息
datetoday = datetime.datetime.today().strftime('%Y%M%D')
get_message.to_csv('ss.csv')
网友评论