su-yj / futureholderrank Goto Github PK
View Code? Open in Web Editor NEW中金所、上期所、郑商所及大商所,四大期货交易所大户持仓排名爬虫
中金所、上期所、郑商所及大商所,四大期货交易所大户持仓排名爬虫
郑商所会员持仓数据,获取不到,请帮忙检查,谢谢
self.url= http://app.czce.com.cn/cms/cmsface/czce/newcms/calendarnewAll.jsp
self.form= {'channelCode': '', 'pubDate': '2021-03-30', 'curpath': '/cn/jysj/ccpm/H770304index_1.htm', 'curpath1': '', 'radio': 'future', 'sub': '查询'}
Response [412]
C:\Anaconda3\lib\site-packages\pandas\core\frame.py:1554: FutureWarning: Using short name for 'orient' is deprecated. Only the options: ('dict', list, 'series', 'split', 'records', 'index') will be used in a future version. Use one of the above to silence this warning.
FutureWarning,
C:\Anaconda3\lib\site-packages\pandas\core\frame.py:4449: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
errors=errors,
Exception in thread Thread-2:
Traceback (most recent call last):
File "C:\supe\FutureHolderRank-master\cffex.py", line 127, in run
self.parse_data(xml_dict)
File "C:\supe\FutureHolderRank-master\cffex.py", line 138, in parse_data
date = xml_dict['positionRank']['positionamt'][0]['tradingday']
KeyError: 'positionamt'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Anaconda3\lib\threading.py", line 926, in _bootstrap_inner
self.run()
File "C:\supe\FutureHolderRank-master\cffex.py", line 132, in run
log.logger.error('数据处理线程出错, 时间:%s,错误信息:%s' % (xml_dict['positionRank']['positionamt'][0]['tradingday'], e), exc_info=True)
KeyError: 'positionamt'
1.如果我只想获得某个交易所某天的数据,那么应该如何运行程序?能否通过命令行传入参数,而不是修改setting.py?因为我的需求是每天拿最新的数据,过去的部分我会感兴趣,但是不需要这么长的数据。我尝试改类的pubDate到2019年9月1日,似乎没用
2.另外每天盘后出数据的时间各不相同,如果是指定获得某一天的数据,能否如果还没有数据就通过某种返回让调用的程序知道还没有数据?
2022-01-27郑商只能爬到2022-01-27,后面日期都没了,看交易所数据格式没变化。请码主给看看,最好更新下吧
/usr/lib64/python3.6/site-packages/pandas/core/ops/init.py:1115: FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison
result = method(y)
2019-09-04 14:05:54,833 - dce.py[line:144] - ERROR: 数据处理线程出错, 文件地址:./tmp/20040105_DCE_DPL.zip,错误信息:[Errno 20] Not a directory: 'tmp/20040105_DCE_DPL.zip/20040105_m0401_│╔╜╗┴┐_┬≥│╓▓╓_┬⌠│╓▓╓┼┼├√.txt'
服务器用的是CentOS7
python3.6.7
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.