Closed cankeyyin closed 1 year ago
遇到任何问题,请先确认您的 AKShare 版本是最新的
pip install akshare --upgrade # Python 版本需要大于 3.7
描述遇到的问题
- 操作系统版本 macOS 10.14.6
- Python 版本 python 3.10.5
- AKShare 版本 akshare 1.8.20
- 接口的名称和代码 接口:index_investing_global和index_investing_global_from_url 代码: index_investing_global_df = ak.index_investing_global(area="中国", symbol="富时中国A50指数", period="每日", start_date="20100101", end_date="20220808")
index_investing_global_df = ak.index_investing_global_from_url(url="https://www.investing.com/indices/ftse-epra-nareit-hong-kong", period="每日", start_date="19900101", end_date="20210909")
- 接口报错的截图或代码 import akshare as ak index_investing_global_df = ak.index_investing_global_from_url(url="https://www.investing.com/indices/ftse-epra-nareit-hong-kong", period="每日", start_date="19900101", end_date="20210909")
Traceback (most recent call last): File "", line 1, in File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/akshare/index/index_investing.py", line 249, in index_investing_global_from_url data_text = soup.find("script", attrs={"id": "NEXT_DATA"}).text AttributeError: 'NoneType' object has no attribute 'text'
index_investing_global_df = ak.index_investing_global(area="中国", symbol="富时中国A50指数", period="每日", start_date="20100101", end_date="20220808")
Traceback (most recent call last): File "", line 1, in File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/akshare/index/index_investing.py", line 162, in index_investing_global name_code_dict = index_investing_global_area_index_name_code(area) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/akshare/index/index_investing.py", line 89, in index_investing_global_area_index_name_code name_url_dict = _get_global_country_name_url() File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/akshare/index/index_investing.py", line 68, in _get_global_country_name_url ).find_all("option")[ AttributeError: 'NoneType' object has no attribute 'find_all'
- 期望获得的正确结果 正常获得数据
该接口暂时不能使用
遇到任何问题,请先确认您的 AKShare 版本是最新的
描述遇到的问题
操作系统版本 macOS 10.14.6
Python 版本 python 3.10.5
AKShare 版本 akshare 1.8.20
接口的名称和代码 接口:index_investing_global和index_investing_global_from_url 代码: index_investing_global_df = ak.index_investing_global(area="中国", symbol="富时中国A50指数", period="每日", start_date="20100101", end_date="20220808")
index_investing_global_df = ak.index_investing_global_from_url(url="https://www.investing.com/indices/ftse-epra-nareit-hong-kong", period="每日", start_date="19900101", end_date="20210909")
Traceback (most recent call last): File "", line 1, in
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/akshare/index/index_investing.py", line 249, in index_investing_global_from_url
data_text = soup.find("script", attrs={"id": "__NEXT_DATA__"}).text
AttributeError: 'NoneType' object has no attribute 'text'
index_investing_global_df = ak.index_investing_global(area="中国", symbol="富时中国A50指数", period="每日", start_date="20100101", end_date="20220808")
Traceback (most recent call last): File "", line 1, in
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/akshare/index/index_investing.py", line 162, in index_investing_global
name_code_dict = index_investing_global_area_index_name_code(area)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/akshare/index/index_investing.py", line 89, in index_investing_global_area_index_name_code
name_url_dict = _get_global_country_name_url()
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/akshare/index/index_investing.py", line 68, in _get_global_country_name_url
).find_all("option")[
AttributeError: 'NoneType' object has no attribute 'find_all'