pkujohnson / opendata Goto Github PK
View Code? Open in Web Editor NEW开源的金融投资数据提取工具,专注在各类网站上爬取数据,并通过简单易用的API方式使用
License: Apache License 2.0
开源的金融投资数据提取工具,专注在各类网站上爬取数据,并通过简单易用的API方式使用
License: Apache License 2.0
你好~想获取其他全球指数示调用报错
df_data, msg = index.get_index_data(symbol='SPX', freq='1d', period='1y')
NameError: name 'YingWeiAgent' is not defined
获取成交明细数据接口无效,爬取的连接
(http://market.finance.sina.com.cn/downxls.php?date=XXXX-XX-XX&symbol=xxxxxx)
服务已下线,能否解决?
你好,我在调用swindex.get_index_dailyindicator()时,系统提示“Couldn't find a tree builder with the features you requested: html5lib.“
After update to version 0.4.7 (Python 3.6.5), the module "realestate" cannot get the data from Anjuke, both get_city_list() and get_real_house_price() returned None.
I have review the module, I found that Anjuke add 2 CAPTCHA, so Anjuke_Agent will not able to get the data.
P.S.There are sth wrong on the wiki of realestate:
df = realestate.realestate.get_real_house_price('北京')
THX
会等很久时间然后返回获取结果失败
老的url失效了
df, msg = stock.get_trade_detail(symbol='600000.SH', trade_date='2018-06-07') df
输出为空
比如coin.get_his_hour()里面的fsmy,tsmy是什么含义?如何正确传递参数?
谢谢~
OpenData/opendatatools/spot/spot_agent.py 107 行 -psm 6 应该改为 --psm 6,
否则报错:
TesseractError: (1, "Error, unknown command line argument '-psm'")
环境 opensuse 64.
如题,目前指数成分只能查当前的,不能查询历史的,历史数据虽然没有每天的,但应该有每月的.
现在似乎已经不需要注册了,短信验证码登陆或者直接微信登陆,不再需要密码了。现在的登陆方法貌似用不了
df, msg = hedgefund.get_fund_nav('HF0000141Y')
/opendatatools/hedgefund/hedgefund_interface.py
224 tag = "return xOrEncrypt(str, "
225 else:
--> 226 tag = "return bitEncrypt(str, "
227 pos = response.index(tag) + len(tag) + 1
228 key = response[pos:pos+32]
ValueError: substring not found
用 hsgt.get_lgt_share() 爬取交易数据时报错如下:
FeatureNotFound: Couldn't find a tree builder with the features you requested: html5lib. Do you need to install a parser library?
hedgefund.set_proxies https://127.0.0.1:1080 起什么作用呢?
是为了隐藏自己的真实ip么?
An proxyerror happens while following code was running, someone can help me to fix this issue? Thanks.
from opendatatools import realestate
city_list = realestate.get_city_list()
print(city_list)
> ProxyError: HTTPSConnectionPool(host='www.anjuke.com', port=443): Max retries exceeded with url: /sy-city.html (Caused by ProxyError('Cannot connect to proxy.', NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x113aa5b70>: Failed to establish a new connection: [Errno 61] Connection refused',)))
example中的demo也不能用
使用stock.get_report_data()api 失效,msg为获取数据失败
import pandas as pd
from pyecharts import Bar
def draw_price(city_list, title):
df_list = []
for city in city_list:
df, msg = realestate.get_real_house_price(city)
if df is not None:
df_list.append(df)
df = pd.concat(df_list)
df = df[df['date'] == '201807']
df.sort_values('price', inplace=True, ascending=True)
axis_x = df['city']
axis_y = df['price']
bar = Bar(title, width=600, height=600)
bar.add("房价", axis_x, axis_y, is_convert=True, is_label_show=True,
bar_category_gap='50%', label_pos='right')
return bar
# 一线城市房价比拼
draw_price(['北京', '上海', '广州', '深圳'], "一线城市房价大比拼")
When I run code above, there are following errors, does someone can help me to fix it? Thanks.
Traceback (most recent call last):
File "<ipython-input-51-736af34863f3>", line 25, in <module>
draw_price(['北京', '上海', '广州', '深圳'], "一线城市房价大比拼")
File "<ipython-input-51-736af34863f3>", line 7, in draw_price
df, msg = realestate.get_real_house_price(city)
File "C:\Users\User\Anaconda3\lib\site-packages\opendatatools\realestate\realestate_interface.py", line 17, in get_real_house_price
return anjuke_agent.get_real_house_price(city)
File "C:\Users\User\Anaconda3\lib\site-packages\opendatatools\realestate\anjuke_agent.py", line 56, in get_real_house_price
xyear = json.loads('{' + AnjukeAgent.extract_word(content, 'xyear:{', '},') + '}')
File "C:\Users\User\Anaconda3\lib\json\__init__.py", line 354, in loads
return _default_decoder.decode(s)
File "C:\Users\User\Anaconda3\lib\json\decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:\Users\User\Anaconda3\lib\json\decoder.py", line 355, in raw_decode
obj, end = self.scan_once(s, idx)
JSONDecodeError: Expecting property name enclosed in double quotes
tushare这块做的不是很好
北上流入实时数据提取显示报错
ConnectionError: HTTPConnectionPool(host='ff.eastmoney.com', port=80): Max retries exceeded with url: /EM_CapitalFlowInterface/api/js?id=north&type=EFR&rtntype=2&acces_token=1942f5da9b46b069953c873404aad4b5&js=%7B%22data%22:[(x)]%7D (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x00000270A7EC83C8>: Failed to establish a new connection: [WinError 10061] 由于目标计算机积极拒绝,无法连接。'))
Shibor能否使用http://www.shibor.org/shibor/web/DataService.jsp的数据?现在的接口只能取最近一年的。谢谢
aqi 接口失效了, http://datacenter.mee.gov.cn 新域名拒绝访问
目前好像只能通过get_index_component('000985.CSI')取中证全指的成分
但是成分股调整滞后,比全部A股少了190只左右
df, msg = swindex.get_index_daily('801193','2000-01-01','2021-11-14')输出空的df
其他行业(如银行、保险、信托)都没问题
应该是申万指数源数据变更了获取方式或地址
KeyError Traceback (most recent call last)
in ()
----> 1 swindex.get_index_cons('801060')
E:\Anaconda3\envs\py35\lib\site-packages\opendatatools\swindex\swindex_interface.py in get_index_cons(index_code)
9
10 def get_index_cons(index_code):
---> 11 return sw_agent.get_index_cons(index_code)
12
13 def get_index_daily(index_code):
E:\Anaconda3\envs\py35\lib\site-packages\opendatatools\swindex\swindex_agent.py in get_index_cons(self, index_code)
74 })
75 df = pd.DataFrame(data)
---> 76 df['start_date'] = df['start_date'].apply(lambda x : datetime.datetime.strptime(x, '%Y/%m/%d %H:%M:%S'))
77 return df, ''
78
E:\Anaconda3\envs\py35\lib\site-packages\pandas\core\frame.py in getitem(self, key)
2686 return self._getitem_multilevel(key)
2687 else:
-> 2688 return self._getitem_column(key)
2689
2690 def _getitem_column(self, key):
E:\Anaconda3\envs\py35\lib\site-packages\pandas\core\frame.py in _getitem_column(self, key)
2693 # get column
2694 if self.columns.is_unique:
-> 2695 return self._get_item_cache(key)
2696
2697 # duplicate columns & possible reduce dimensionality
E:\Anaconda3\envs\py35\lib\site-packages\pandas\core\generic.py in _get_item_cache(self, item)
2487 res = cache.get(item)
2488 if res is None:
-> 2489 values = self._data.get(item)
2490 res = self._box_item_values(item, values)
2491 cache[item] = res
E:\Anaconda3\envs\py35\lib\site-packages\pandas\core\internals.py in get(self, item, fastpath)
4113
4114 if not isna(item):
-> 4115 loc = self.items.get_loc(item)
4116 else:
4117 indexer = np.arange(len(self.items))[isna(self.items)]
E:\Anaconda3\envs\py35\lib\site-packages\pandas\core\indexes\base.py in get_loc(self, key, method, tolerance)
3078 return self._engine.get_loc(key)
3079 except KeyError:
-> 3080 return self._engine.get_loc(self._maybe_cast_indexer(key))
3081
3082 indexer = self.get_indexer([key], method=method, tolerance=tolerance)
pandas_libs\index.pyx in pandas._libs.index.IndexEngine.get_loc()
pandas_libs\index.pyx in pandas._libs.index.IndexEngine.get_loc()
pandas_libs\hashtable_class_helper.pxi in pandas._libs.hashtable.PyObjectHashTable.get_item()
pandas_libs\hashtable_class_helper.pxi in pandas._libs.hashtable.PyObjectHashTable.get_item()
KeyError: 'start_date'
读取私募净值数据会漏掉第一页
请问在获取私募基金数据时,get_fund_list是成功的,但get_fund_nav获取数据失败
get_fund_list_page 通过url筛选基金分类的参数 “fund_type:1,6,4,3,8,2;ret:9;rating_year:1” 缺少说明
目前 nasdaq 的获取 symbols csv 的链接已经变了,可以参考
https://stackoverflow.com/questions/25338608/download-all-stock-symbol-list-of-a-market
望修复!
wows-api.wallstreetcn.com/v3/aioria/plates/rank?count=2000&rank_type=core_pcp_rank
网址变了,麻烦改一下库,没研究过怎么提交PR
https://flash-api.xuangubao.cn/api/plate/rank?count=2000&field=core_avg_pcp
from opendatatools import index 就出了一个bug
修改了了一下index_interface.py的import,又出来一个get_index_data() got an unexpected keyword argument 'symbol'
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.