5 Star 17 Fork 14

燕洼仙草 / Listed-company-news-crawl-and-text-analysis

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
run_crawler_tushare.py 686 Bytes
一键复制 编辑 原始数据 按行查看 历史
燕洼仙草 提交于 2018-07-14 02:06 . 修改
# from gevent import time
import time
from Crawler import crawler_tushare_new as ctn
if __name__ == '__main__':
time.sleep(5)
ctn.saveTodayAllStock()
time.sleep(10)
ctn.saveHistScodes()
'''
t1 = time.time()
# Initiate
Obj = CrawlStockData(IP="localhost",PORT=27017)
# Get basic infos of stocks
Obj.getStockBasicFromTushare("Stock","Basic_Info")
# Extract stocks' code
Code = Obj.extractData('Stock','Basic_Info',['code'])[0]
# Get stock price from Tushare
for stockcode in Code:
Obj.getStockDayHistory('Stock',stockcode)
print(' [*] ' + stockcode + ' has finished storing ... ')
t2 = time.time()
print(' running time:', t2 - t1)
'''
Python
1
https://gitee.com/QinZhuChaXiang/Listed-company-news-crawl-and-text-analysis.git
git@gitee.com:QinZhuChaXiang/Listed-company-news-crawl-and-text-analysis.git
QinZhuChaXiang
Listed-company-news-crawl-and-text-analysis
Listed-company-news-crawl-and-text-analysis
master

搜索帮助