12 月 132016
 

一:首先你需要安装easytrader,可以参考:https://github.com/shidenggui/easytrader

我在安装的时候遇到了几个问题:

1:

NFEW)]R(E`EIY7OJU_BH_O7

这个是缺少tesseract,安装相关的tesseract软件就好了。

yum -y install tesseract

/root/anaconda3/bin/pip install tesseract

2::

U{}1S%EIY`)2KI3}D6LCI7O

这个报错是python2.7的时候报的错,换成python3.5就好,不过tesseract安装完之后,我发现python2.7就没这个报错,应该跟版本关系不大。

二:获取广发的账号和密码。需要个可以用的老的广发web的ur:https://gftrade.gf.com.cn/ (估计过段时间就不行了)

通过firedebug或者其他软件抓取加密后的账号和密码。这里有个诀窍,可以输入错误的验证码,防止跳转。

image

把这个加密后的账号和密码写入到gf.json。通过一下就可以使用了。

import easytrader

user = easytrader.use(‘gf’) # 广发支持 [‘gf’, ‘GF’, ‘广发’]

user.prepare(‘/path/to/your/ht.json’) // 或者 yh.json 或者 yh_client.json 等配置文件路径

后续的可以参考https://github.com/shidenggui/easytrader 的说明文档,去程序化使用账号。

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)

这个站点使用 Akismet 来减少垃圾评论。了解你的评论数据如何被处理

This website stores cookies on your computer. These cookies are used to provide a more personalized experience and to track your whereabouts around our website in compliance with the European General Data Protection Regulation. If you decide to to opt-out of any future tracking, a cookie will be setup in your browser to remember this choice for one year.

Accept or Deny