首页 > IT职业 > IT职场 > python 股票价格查询
pip install beautifulsoup4
pip install requests
pip install lxml
pip install pandas
pip install tushare import tushare as ts
# http://tushare.org/
# , end='2018-04-19'
code = '002460'
e = ts.get_hist_data(code, start='2018-01-01')
file = open(code + ".txt", 'w')
msg = file.write(str(e))
file.close() 来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/4363/viewspace-2800558/ ,如需转载,请注明出处,否则将追究法律责任。