-
Notifications
You must be signed in to change notification settings - Fork 331
14. 选股宝主题
PKUJohnson edited this page Dec 20, 2018
·
3 revisions
OpenDataTools通过wscn接口,支持对选股宝网站上的各类数据的获取,要求版本0.8.6以上。
数据来源:华尔街见闻,选股宝
# 导入模块
from opendatatools import wscn
# 使用前先登录,请先在 https://xuangubao.cn/ 注册用户
user = 'username'
password = 'password'
wscn.login(user, password)
df, msg = wscn.get_xuangubao_theme()
tid = 22411474
df_data, msg = wscn.get_xuangubao_theme_stock(tid)
# K线数据
tid = 22411474
df_data, msg = wscn.get_xuangubao_theme_kline(tid)
# Events (关联新闻)
tid = 22411474
df_data, msg = wscn.get_xuangubao_theme_event(tid)
df_data["Title"]