Tushare原学习文档(六 新闻事件数据)

转tushare原网址:网址:http://tushare.org/trading.html#id2
import tushare as ts

 

1.即时新闻(已转移到tushare新接口)

ts.get_latest_news()  ,默认是80条新闻 ts.get_latest_news(数字小于八十)

ts.get_latest_news(top=10,show_content=True)  显示十条数据 当show_centent=True 显示新闻内容

 

2.信息地雷

ts.get_notices()   此处官网是这么写的,但是没有执行结果

参数说明:

  • code:股票代码
  • date:信息公布日期

返回值说明:

  • title:信息标题
  • type:信息类型
  • date:公告日期
  • url:信息内容URL

3.新浪股吧

ts.guba_sina()
df = guba_sina(True)
print df.ix[3]['content'] #第3条消息的内容
 

参数说明:

  • show_content:boolean,是否显示内容,默认False

返回值说明:

  • title, 消息标题
  • content, 消息内容(show_content=True的情况下)
  • ptime, 发布时间
  • rcounts,阅读次数

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值