akshare 1.14.40__py3-none-any.whl → 1.14.41__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of akshare might be problematic. Click here for more details.
- akshare/__init__.py +2 -1
- akshare/fund/fund_report_cninfo.py +23 -19
- akshare/stock/stock_cg_equity_mortgage.py +11 -10
- akshare/stock/stock_hold_control_cninfo.py +17 -15
- akshare/stock/stock_hold_num_cninfo.py +11 -10
- {akshare-1.14.40.dist-info → akshare-1.14.41.dist-info}/METADATA +1 -1
- {akshare-1.14.40.dist-info → akshare-1.14.41.dist-info}/RECORD +10 -10
- {akshare-1.14.40.dist-info → akshare-1.14.41.dist-info}/LICENSE +0 -0
- {akshare-1.14.40.dist-info → akshare-1.14.41.dist-info}/WHEEL +0 -0
- {akshare-1.14.40.dist-info → akshare-1.14.41.dist-info}/top_level.txt +0 -0
akshare/__init__.py
CHANGED
|
@@ -2851,9 +2851,10 @@ amac_manager_cancelled_info # 中国证券投资基金业协会-信息公示-诚
|
|
|
2851
2851
|
1.14.38 fix: fix stock_industry_clf_hist_sw interface
|
|
2852
2852
|
1.14.39 fix: fix stock_zh_b_daily interface
|
|
2853
2853
|
1.14.40 fix: fix fund_open_fund_rank_em interface
|
|
2854
|
+
1.14.41 fix: fix fund_report_asset_allocation_cninfo interface
|
|
2854
2855
|
"""
|
|
2855
2856
|
|
|
2856
|
-
__version__ = "1.14.
|
|
2857
|
+
__version__ = "1.14.41"
|
|
2857
2858
|
__author__ = "AKFamily"
|
|
2858
2859
|
|
|
2859
2860
|
import sys
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
# -*- coding:utf-8 -*-
|
|
2
2
|
# !/usr/bin/env python
|
|
3
3
|
"""
|
|
4
|
-
Date:
|
|
4
|
+
Date: 2024/7/24 23:30
|
|
5
5
|
Desc: 巨潮资讯-数据中心-专题统计-基金报表
|
|
6
|
-
|
|
6
|
+
https://webapi.cninfo.com.cn/#/thematicStatistics
|
|
7
7
|
"""
|
|
8
8
|
|
|
9
9
|
import pandas as pd
|
|
10
|
-
import requests
|
|
11
10
|
import py_mini_racer
|
|
11
|
+
import requests
|
|
12
12
|
|
|
13
13
|
from akshare.datasets import get_ths_js
|
|
14
14
|
|
|
@@ -22,7 +22,7 @@ def _get_file_content_cninfo(file: str = "cninfo.js") -> str:
|
|
|
22
22
|
:rtype: str
|
|
23
23
|
"""
|
|
24
24
|
setting_file_path = get_ths_js(file)
|
|
25
|
-
with open(setting_file_path) as f:
|
|
25
|
+
with open(setting_file_path, encoding="utf-8") as f:
|
|
26
26
|
file_data = f.read()
|
|
27
27
|
return file_data
|
|
28
28
|
|
|
@@ -30,13 +30,13 @@ def _get_file_content_cninfo(file: str = "cninfo.js") -> str:
|
|
|
30
30
|
def fund_report_stock_cninfo(date: str = "20210630") -> pd.DataFrame:
|
|
31
31
|
"""
|
|
32
32
|
巨潮资讯-数据中心-专题统计-基金报表-基金重仓股
|
|
33
|
-
|
|
33
|
+
https://webapi.cninfo.com.cn/#/thematicStatistics
|
|
34
34
|
:param date: 报告时间; choice of {"XXXX0331", "XXXX0630", "XXXX0930", "XXXX1231"}
|
|
35
35
|
:type date: str
|
|
36
36
|
:return: 基金重仓股
|
|
37
37
|
:rtype: pandas.DataFrame
|
|
38
38
|
"""
|
|
39
|
-
url = "
|
|
39
|
+
url = "https://webapi.cninfo.com.cn/api/sysapi/p_sysapi1112"
|
|
40
40
|
js_code = py_mini_racer.MiniRacer()
|
|
41
41
|
js_content = _get_file_content_cninfo("cninfo.js")
|
|
42
42
|
js_code.eval(js_content)
|
|
@@ -49,11 +49,12 @@ def fund_report_stock_cninfo(date: str = "20210630") -> pd.DataFrame:
|
|
|
49
49
|
"Cache-Control": "no-cache",
|
|
50
50
|
"Content-Length": "0",
|
|
51
51
|
"Host": "webapi.cninfo.com.cn",
|
|
52
|
-
"Origin": "
|
|
52
|
+
"Origin": "https://webapi.cninfo.com.cn",
|
|
53
53
|
"Pragma": "no-cache",
|
|
54
54
|
"Proxy-Connection": "keep-alive",
|
|
55
|
-
"Referer": "
|
|
56
|
-
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko)
|
|
55
|
+
"Referer": "https://webapi.cninfo.com.cn/",
|
|
56
|
+
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) "
|
|
57
|
+
"Chrome/93.0.4577.63 Safari/537.36",
|
|
57
58
|
"X-Requested-With": "XMLHttpRequest",
|
|
58
59
|
}
|
|
59
60
|
params = {
|
|
@@ -89,19 +90,20 @@ def fund_report_stock_cninfo(date: str = "20210630") -> pd.DataFrame:
|
|
|
89
90
|
temp_df["持股总数"] = pd.to_numeric(temp_df["持股总数"], errors="coerce")
|
|
90
91
|
temp_df["持股总市值"] = pd.to_numeric(temp_df["持股总市值"], errors="coerce")
|
|
91
92
|
temp_df["基金覆盖家数"] = pd.to_numeric(temp_df["基金覆盖家数"], errors="coerce")
|
|
93
|
+
temp_df["序号"] = range(1, len(temp_df) + 1)
|
|
92
94
|
return temp_df
|
|
93
95
|
|
|
94
96
|
|
|
95
97
|
def fund_report_industry_allocation_cninfo(date: str = "20210630") -> pd.DataFrame:
|
|
96
98
|
"""
|
|
97
99
|
巨潮资讯-数据中心-专题统计-基金报表-基金行业配置
|
|
98
|
-
|
|
100
|
+
https://webapi.cninfo.com.cn/#/thematicStatistics
|
|
99
101
|
:param date: 报告时间; choice of {"XXXX0331", "XXXX0630", "XXXX0930", "XXXX1231"}, 从 2017 年开始
|
|
100
102
|
:type date: str
|
|
101
103
|
:return: 基金行业配置
|
|
102
104
|
:rtype: pandas.DataFrame
|
|
103
105
|
"""
|
|
104
|
-
url = "
|
|
106
|
+
url = "https://webapi.cninfo.com.cn/api/sysapi/p_sysapi1113"
|
|
105
107
|
js_code = py_mini_racer.MiniRacer()
|
|
106
108
|
js_content = _get_file_content_cninfo("cninfo.js")
|
|
107
109
|
js_code.eval(js_content)
|
|
@@ -114,11 +116,12 @@ def fund_report_industry_allocation_cninfo(date: str = "20210630") -> pd.DataFra
|
|
|
114
116
|
"Cache-Control": "no-cache",
|
|
115
117
|
"Content-Length": "0",
|
|
116
118
|
"Host": "webapi.cninfo.com.cn",
|
|
117
|
-
"Origin": "
|
|
119
|
+
"Origin": "https://webapi.cninfo.com.cn",
|
|
118
120
|
"Pragma": "no-cache",
|
|
119
121
|
"Proxy-Connection": "keep-alive",
|
|
120
|
-
"Referer": "
|
|
121
|
-
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko)
|
|
122
|
+
"Referer": "https://webapi.cninfo.com.cn/",
|
|
123
|
+
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) "
|
|
124
|
+
"Chrome/93.0.4577.63 Safari/537.36",
|
|
122
125
|
"X-Requested-With": "XMLHttpRequest",
|
|
123
126
|
}
|
|
124
127
|
params = {
|
|
@@ -158,11 +161,11 @@ def fund_report_industry_allocation_cninfo(date: str = "20210630") -> pd.DataFra
|
|
|
158
161
|
def fund_report_asset_allocation_cninfo() -> pd.DataFrame:
|
|
159
162
|
"""
|
|
160
163
|
巨潮资讯-数据中心-专题统计-基金报表-基金资产配置
|
|
161
|
-
|
|
164
|
+
https://webapi.cninfo.com.cn/#/thematicStatistics
|
|
162
165
|
:return: 基金资产配置
|
|
163
166
|
:rtype: pandas.DataFrame
|
|
164
167
|
"""
|
|
165
|
-
url = "
|
|
168
|
+
url = "https://webapi.cninfo.com.cn/api/sysapi/p_sysapi1114"
|
|
166
169
|
js_code = py_mini_racer.MiniRacer()
|
|
167
170
|
js_content = _get_file_content_cninfo("cninfo.js")
|
|
168
171
|
js_code.eval(js_content)
|
|
@@ -175,11 +178,12 @@ def fund_report_asset_allocation_cninfo() -> pd.DataFrame:
|
|
|
175
178
|
"Cache-Control": "no-cache",
|
|
176
179
|
"Content-Length": "0",
|
|
177
180
|
"Host": "webapi.cninfo.com.cn",
|
|
178
|
-
"Origin": "
|
|
181
|
+
"Origin": "https://webapi.cninfo.com.cn",
|
|
179
182
|
"Pragma": "no-cache",
|
|
180
183
|
"Proxy-Connection": "keep-alive",
|
|
181
|
-
"Referer": "
|
|
182
|
-
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko)
|
|
184
|
+
"Referer": "https://webapi.cninfo.com.cn/",
|
|
185
|
+
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) "
|
|
186
|
+
"Chrome/93.0.4577.63 Safari/537.36",
|
|
183
187
|
"X-Requested-With": "XMLHttpRequest",
|
|
184
188
|
}
|
|
185
189
|
r = requests.post(url, headers=headers)
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env python
|
|
2
2
|
# -*- coding:utf-8 -*-
|
|
3
3
|
"""
|
|
4
|
-
Date:
|
|
4
|
+
Date: 2024/7/24 23:30
|
|
5
5
|
Desc: 巨潮资讯-数据中心-专题统计-公司治理-股权质押
|
|
6
|
-
|
|
6
|
+
https://webapi.cninfo.com.cn/#/thematicStatistics
|
|
7
7
|
"""
|
|
8
8
|
|
|
9
9
|
import pandas as pd
|
|
10
|
-
import requests
|
|
11
10
|
import py_mini_racer
|
|
11
|
+
import requests
|
|
12
12
|
|
|
13
13
|
from akshare.datasets import get_ths_js
|
|
14
14
|
|
|
@@ -22,7 +22,7 @@ def _get_file_content_ths(file: str = "cninfo.js") -> str:
|
|
|
22
22
|
:rtype: str
|
|
23
23
|
"""
|
|
24
24
|
setting_file_path = get_ths_js(file)
|
|
25
|
-
with open(setting_file_path) as f:
|
|
25
|
+
with open(setting_file_path, encoding="utf-8") as f:
|
|
26
26
|
file_data = f.read()
|
|
27
27
|
return file_data
|
|
28
28
|
|
|
@@ -30,13 +30,13 @@ def _get_file_content_ths(file: str = "cninfo.js") -> str:
|
|
|
30
30
|
def stock_cg_equity_mortgage_cninfo(date: str = "20210930") -> pd.DataFrame:
|
|
31
31
|
"""
|
|
32
32
|
巨潮资讯-数据中心-专题统计-公司治理-股权质押
|
|
33
|
-
|
|
33
|
+
https://webapi.cninfo.com.cn/#/thematicStatistics
|
|
34
34
|
:param date: 开始统计时间
|
|
35
35
|
:type date: str
|
|
36
36
|
:return: 股权质押
|
|
37
37
|
:rtype: pandas.DataFrame
|
|
38
38
|
"""
|
|
39
|
-
url = "
|
|
39
|
+
url = "https://webapi.cninfo.com.cn/api/sysapi/p_sysapi1094"
|
|
40
40
|
js_code = py_mini_racer.MiniRacer()
|
|
41
41
|
js_content = _get_file_content_ths("cninfo.js")
|
|
42
42
|
js_code.eval(js_content)
|
|
@@ -49,11 +49,12 @@ def stock_cg_equity_mortgage_cninfo(date: str = "20210930") -> pd.DataFrame:
|
|
|
49
49
|
"Cache-Control": "no-cache",
|
|
50
50
|
"Content-Length": "0",
|
|
51
51
|
"Host": "webapi.cninfo.com.cn",
|
|
52
|
-
"Origin": "
|
|
52
|
+
"Origin": "https://webapi.cninfo.com.cn",
|
|
53
53
|
"Pragma": "no-cache",
|
|
54
54
|
"Proxy-Connection": "keep-alive",
|
|
55
|
-
"Referer": "
|
|
56
|
-
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko)
|
|
55
|
+
"Referer": "https://webapi.cninfo.com.cn/",
|
|
56
|
+
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) "
|
|
57
|
+
"Chrome/93.0.4577.63 Safari/537.36",
|
|
57
58
|
"X-Requested-With": "XMLHttpRequest",
|
|
58
59
|
}
|
|
59
60
|
params = {
|
|
@@ -88,7 +89,7 @@ def stock_cg_equity_mortgage_cninfo(date: str = "20210930") -> pd.DataFrame:
|
|
|
88
89
|
"累计质押占总股本比例",
|
|
89
90
|
]
|
|
90
91
|
]
|
|
91
|
-
temp_df["公告日期"] = pd.to_datetime(temp_df["公告日期"]).dt.date
|
|
92
|
+
temp_df["公告日期"] = pd.to_datetime(temp_df["公告日期"], errors="coerce").dt.date
|
|
92
93
|
temp_df["质押数量"] = pd.to_numeric(temp_df["质押数量"], errors="coerce")
|
|
93
94
|
temp_df["占总股本比例"] = pd.to_numeric(temp_df["占总股本比例"], errors="coerce")
|
|
94
95
|
temp_df["质押解除数量"] = pd.to_numeric(temp_df["质押解除数量"], errors="coerce")
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
#!/usr/bin/env python
|
|
2
2
|
# -*- coding:utf-8 -*-
|
|
3
3
|
"""
|
|
4
|
-
Date:
|
|
4
|
+
Date: 2024/7/24 23:30
|
|
5
5
|
Desc: 巨潮资讯-数据中心-专题统计-股东股本-实际控制人持股变动
|
|
6
|
-
|
|
6
|
+
https://webapi.cninfo.com.cn/#/thematicStatistics
|
|
7
7
|
|
|
8
8
|
巨潮资讯-数据中心-专题统计-股东股本-高管持股变动明细
|
|
9
|
-
|
|
9
|
+
https://webapi.cninfo.com.cn/#/thematicStatistics
|
|
10
10
|
"""
|
|
11
11
|
|
|
12
12
|
import datetime
|
|
13
13
|
|
|
14
14
|
import pandas as pd
|
|
15
|
-
import requests
|
|
16
15
|
import py_mini_racer
|
|
16
|
+
import requests
|
|
17
17
|
|
|
18
18
|
from akshare.datasets import get_ths_js
|
|
19
19
|
|
|
@@ -27,7 +27,7 @@ def _get_file_content_cninfo(file: str = "cninfo.js") -> str:
|
|
|
27
27
|
:rtype: str
|
|
28
28
|
"""
|
|
29
29
|
setting_file_path = get_ths_js(file)
|
|
30
|
-
with open(setting_file_path) as f:
|
|
30
|
+
with open(setting_file_path, encoding="utf-8") as f:
|
|
31
31
|
file_data = f.read()
|
|
32
32
|
return file_data
|
|
33
33
|
|
|
@@ -35,7 +35,7 @@ def _get_file_content_cninfo(file: str = "cninfo.js") -> str:
|
|
|
35
35
|
def stock_hold_control_cninfo(symbol: str = "全部") -> pd.DataFrame:
|
|
36
36
|
"""
|
|
37
37
|
巨潮资讯-数据中心-专题统计-股东股本-实际控制人持股变动
|
|
38
|
-
|
|
38
|
+
https://webapi.cninfo.com.cn/#/thematicStatistics
|
|
39
39
|
:param symbol: choice of {"单独控制", "实际控制人", "一致行动人", "家族控制", "全部"}; 从 2010 开始
|
|
40
40
|
:type symbol: str
|
|
41
41
|
:return: 实际控制人持股变动
|
|
@@ -48,7 +48,7 @@ def stock_hold_control_cninfo(symbol: str = "全部") -> pd.DataFrame:
|
|
|
48
48
|
"家族控制": "069004",
|
|
49
49
|
"全部": "",
|
|
50
50
|
}
|
|
51
|
-
url = "
|
|
51
|
+
url = "https://webapi.cninfo.com.cn/api/sysapi/p_sysapi1033"
|
|
52
52
|
js_code = py_mini_racer.MiniRacer()
|
|
53
53
|
js_content = _get_file_content_cninfo("cninfo.js")
|
|
54
54
|
js_code.eval(js_content)
|
|
@@ -61,11 +61,12 @@ def stock_hold_control_cninfo(symbol: str = "全部") -> pd.DataFrame:
|
|
|
61
61
|
"Cache-Control": "no-cache",
|
|
62
62
|
"Content-Length": "0",
|
|
63
63
|
"Host": "webapi.cninfo.com.cn",
|
|
64
|
-
"Origin": "
|
|
64
|
+
"Origin": "https://webapi.cninfo.com.cn",
|
|
65
65
|
"Pragma": "no-cache",
|
|
66
66
|
"Proxy-Connection": "keep-alive",
|
|
67
|
-
"Referer": "
|
|
68
|
-
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko)
|
|
67
|
+
"Referer": "https://webapi.cninfo.com.cn/",
|
|
68
|
+
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) "
|
|
69
|
+
"Chrome/93.0.4577.63 Safari/537.36",
|
|
69
70
|
"X-Requested-With": "XMLHttpRequest",
|
|
70
71
|
}
|
|
71
72
|
params = {
|
|
@@ -105,7 +106,7 @@ def stock_hold_control_cninfo(symbol: str = "全部") -> pd.DataFrame:
|
|
|
105
106
|
def stock_hold_management_detail_cninfo(symbol: str = "增持") -> pd.DataFrame:
|
|
106
107
|
"""
|
|
107
108
|
巨潮资讯-数据中心-专题统计-股东股本-高管持股变动明细
|
|
108
|
-
|
|
109
|
+
https://webapi.cninfo.com.cn/#/thematicStatistics
|
|
109
110
|
:param symbol: choice of {"增持", "减持"}
|
|
110
111
|
:type symbol: str
|
|
111
112
|
:return: 高管持股变动明细
|
|
@@ -116,7 +117,7 @@ def stock_hold_management_detail_cninfo(symbol: str = "增持") -> pd.DataFrame:
|
|
|
116
117
|
"减持": "S",
|
|
117
118
|
}
|
|
118
119
|
current_date = datetime.datetime.now().date().isoformat()
|
|
119
|
-
url = "
|
|
120
|
+
url = "https://webapi.cninfo.com.cn/api/sysapi/p_sysapi1030"
|
|
120
121
|
js_code = py_mini_racer.MiniRacer()
|
|
121
122
|
js_content = _get_file_content_cninfo("cninfo.js")
|
|
122
123
|
js_code.eval(js_content)
|
|
@@ -129,11 +130,12 @@ def stock_hold_management_detail_cninfo(symbol: str = "增持") -> pd.DataFrame:
|
|
|
129
130
|
"Content-Length": "0",
|
|
130
131
|
"Host": "webapi.cninfo.com.cn",
|
|
131
132
|
"Accept-Enckey": mcode,
|
|
132
|
-
"Origin": "
|
|
133
|
+
"Origin": "https://webapi.cninfo.com.cn",
|
|
133
134
|
"Pragma": "no-cache",
|
|
134
135
|
"Proxy-Connection": "keep-alive",
|
|
135
|
-
"Referer": "
|
|
136
|
-
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko)
|
|
136
|
+
"Referer": "https://webapi.cninfo.com.cn/",
|
|
137
|
+
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) "
|
|
138
|
+
"Chrome/93.0.4577.63 Safari/537.36",
|
|
137
139
|
"X-Requested-With": "XMLHttpRequest",
|
|
138
140
|
}
|
|
139
141
|
params = {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env python
|
|
2
2
|
# -*- coding:utf-8 -*-
|
|
3
3
|
"""
|
|
4
|
-
Date:
|
|
4
|
+
Date: 2024/7/24 23:30
|
|
5
5
|
Desc: 巨潮资讯-数据中心-专题统计-股东股本-股东人数及持股集中度
|
|
6
|
-
|
|
6
|
+
https://webapi.cninfo.com.cn/#/thematicStatistics
|
|
7
7
|
"""
|
|
8
8
|
|
|
9
9
|
import pandas as pd
|
|
10
|
-
import requests
|
|
11
10
|
import py_mini_racer
|
|
11
|
+
import requests
|
|
12
12
|
|
|
13
13
|
from akshare.datasets import get_ths_js
|
|
14
14
|
|
|
@@ -22,7 +22,7 @@ def _get_file_content_ths(file: str = "cninfo.js") -> str:
|
|
|
22
22
|
:rtype: str
|
|
23
23
|
"""
|
|
24
24
|
setting_file_path = get_ths_js(file)
|
|
25
|
-
with open(setting_file_path) as f:
|
|
25
|
+
with open(setting_file_path, encoding="utf-8") as f:
|
|
26
26
|
file_data = f.read()
|
|
27
27
|
return file_data
|
|
28
28
|
|
|
@@ -30,13 +30,13 @@ def _get_file_content_ths(file: str = "cninfo.js") -> str:
|
|
|
30
30
|
def stock_hold_num_cninfo(date: str = "20210630") -> pd.DataFrame:
|
|
31
31
|
"""
|
|
32
32
|
巨潮资讯-数据中心-专题统计-股东股本-股东人数及持股集中度
|
|
33
|
-
|
|
33
|
+
https://webapi.cninfo.com.cn/#/thematicStatistics
|
|
34
34
|
:param date: choice of {"XXXX0331", "XXXX0630", "XXXX0930", "XXXX1231"}; 从 20170331 开始
|
|
35
35
|
:type date: str
|
|
36
36
|
:return: 股东人数及持股集中度
|
|
37
37
|
:rtype: pandas.DataFrame
|
|
38
38
|
"""
|
|
39
|
-
url = "
|
|
39
|
+
url = "https://webapi.cninfo.com.cn/api/sysapi/p_sysapi1034"
|
|
40
40
|
js_code = py_mini_racer.MiniRacer()
|
|
41
41
|
js_content = _get_file_content_ths("cninfo.js")
|
|
42
42
|
js_code.eval(js_content)
|
|
@@ -49,11 +49,12 @@ def stock_hold_num_cninfo(date: str = "20210630") -> pd.DataFrame:
|
|
|
49
49
|
"Cache-Control": "no-cache",
|
|
50
50
|
"Content-Length": "0",
|
|
51
51
|
"Host": "webapi.cninfo.com.cn",
|
|
52
|
-
"Origin": "
|
|
52
|
+
"Origin": "https://webapi.cninfo.com.cn",
|
|
53
53
|
"Pragma": "no-cache",
|
|
54
54
|
"Proxy-Connection": "keep-alive",
|
|
55
|
-
"Referer": "
|
|
56
|
-
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko)
|
|
55
|
+
"Referer": "https://webapi.cninfo.com.cn/",
|
|
56
|
+
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) "
|
|
57
|
+
"Chrome/93.0.4577.63 Safari/537.36",
|
|
57
58
|
"X-Requested-With": "XMLHttpRequest",
|
|
58
59
|
}
|
|
59
60
|
params = {
|
|
@@ -86,7 +87,7 @@ def stock_hold_num_cninfo(date: str = "20210630") -> pd.DataFrame:
|
|
|
86
87
|
"人均持股数量增幅",
|
|
87
88
|
]
|
|
88
89
|
]
|
|
89
|
-
temp_df["变动日期"] = pd.to_datetime(temp_df["变动日期"]).dt.date
|
|
90
|
+
temp_df["变动日期"] = pd.to_datetime(temp_df["变动日期"], errors="coerce").dt.date
|
|
90
91
|
temp_df["本期人均持股数量"] = pd.to_numeric(
|
|
91
92
|
temp_df["本期人均持股数量"], errors="coerce"
|
|
92
93
|
)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
akshare/__init__.py,sha256=
|
|
1
|
+
akshare/__init__.py,sha256=quEKyO6OetuNOrR_wjNwgfHRQWDFi370GayaKLBgHUI,179944
|
|
2
2
|
akshare/datasets.py,sha256=oIu1zC7o_LMHY22lQmdM7vCnryHibKrJLBqJwQiitlI,1167
|
|
3
3
|
akshare/air/__init__.py,sha256=RMTf1bT5EOE3ttWpn3hGu1LtUmsVxDoa0W7W0gXHOy8,81
|
|
4
4
|
akshare/air/air_hebei.py,sha256=xIXNGLK7IGYqrkteM9fxnHAwWqk6PCQs6D9-ggZ7byY,4442
|
|
@@ -97,7 +97,7 @@ akshare/fund/fund_portfolio_em.py,sha256=8kk7a8hA22ANfnlnK1j4f5qXepfkgJOiEMpuazP
|
|
|
97
97
|
akshare/fund/fund_position_lg.py,sha256=dxwGvfc8SXlRziWBWHIcaqOOltsKlxHgHL0Cxr7cCeM,3857
|
|
98
98
|
akshare/fund/fund_rank_em.py,sha256=FZX5YxoGAaRWlqKJDp1CLWORjxzvHMFCnoKp2yx-K4k,17874
|
|
99
99
|
akshare/fund/fund_rating.py,sha256=oBZTOBaiC9RMfTK2XGKIMY58sPxc7M6GlMJ3_M3i0lQ,11680
|
|
100
|
-
akshare/fund/fund_report_cninfo.py,sha256=
|
|
100
|
+
akshare/fund/fund_report_cninfo.py,sha256=rhztaa3J48VdnCEXFAl8wMg-P7MI2iQa0HculkvL8CI,8785
|
|
101
101
|
akshare/fund/fund_scale_em.py,sha256=8XLZpz9DzsAnJCo1moBmzf3u7mfZNZHsb3cPKJ-gCJM,4237
|
|
102
102
|
akshare/fund/fund_scale_sina.py,sha256=cQ39Pt6ia3GrVCFWv0GhLMqxyedX3qRrvkDLee7N9R0,8083
|
|
103
103
|
akshare/fund/fund_xq.py,sha256=qGMKYC0Vi2AXfnjsS0P9B2ITfpkQ85i4ayXA6kJ6a7o,11295
|
|
@@ -237,7 +237,7 @@ akshare/stock/stock_allotment_cninfo.py,sha256=qk--nWhskZWnUUOwBvfgiFJEOd1GqmQij
|
|
|
237
237
|
akshare/stock/stock_ask_bid_em.py,sha256=ioVkmRMVs7A7Lj_PboxwIoZINNk73nAko80wIJX4RKU,5510
|
|
238
238
|
akshare/stock/stock_board_concept_em.py,sha256=iajw06K04I-F9VGXbuJf5Vz_digDCgMi4J1vgzkmbFA,14039
|
|
239
239
|
akshare/stock/stock_board_industry_em.py,sha256=ZyDnlwAFBEtQI2KEThqs7QG6Akl1DBbKFy7qB3tzqN0,16161
|
|
240
|
-
akshare/stock/stock_cg_equity_mortgage.py,sha256=
|
|
240
|
+
akshare/stock/stock_cg_equity_mortgage.py,sha256=Pui5aWKKPwGuKjF_GNpejDzsMGNPrxiaJviLz3x2e9I,3426
|
|
241
241
|
akshare/stock/stock_cg_guarantee.py,sha256=ts7qcQhhyN1PHB7Q4XlMn38HhfVvubOvky9RZfmUP94,3844
|
|
242
242
|
akshare/stock/stock_cg_lawsuit.py,sha256=6Y92pPw0JgyrInteqHuU07G1jwmdX2wjaDtrJN8y6Hg,4129
|
|
243
243
|
akshare/stock/stock_dividend_cninfo.py,sha256=_vipLQu94qBDoPkaIWZKRFA0mFfgroUMnn5EdLcjAc4,3195
|
|
@@ -249,9 +249,9 @@ akshare/stock/stock_hk_famous.py,sha256=2tAiC86vpcxwX-2fpV4jjQMExUhG2f7C450fbl_G
|
|
|
249
249
|
akshare/stock/stock_hk_fhpx_ths.py,sha256=68soKJIOMoAGuCvJIMZBVU-2wL_umtv67SuqVzl2C14,2191
|
|
250
250
|
akshare/stock/stock_hk_hot_rank_em.py,sha256=IhLGahWXfYPQRrCoB1Ph7DRbs_39BcrmXpIgXgEkttg,4746
|
|
251
251
|
akshare/stock/stock_hk_sina.py,sha256=sRX977vZ_nbuJ2Y7a8WA6efHp79h2ikocH3xfZ1hLfg,9586
|
|
252
|
-
akshare/stock/stock_hold_control_cninfo.py,sha256=
|
|
252
|
+
akshare/stock/stock_hold_control_cninfo.py,sha256=NpUDtfYCDQGhqX1ZAL8Uy2yslZ2zc15YBrzOt5_4k6o,7065
|
|
253
253
|
akshare/stock/stock_hold_control_em.py,sha256=iBgnSEV7aYdsS2Ce7ELIUqVo-polfYdqcd6UmEuVN7g,7349
|
|
254
|
-
akshare/stock/stock_hold_num_cninfo.py,sha256=
|
|
254
|
+
akshare/stock/stock_hold_num_cninfo.py,sha256=JY9LcZMhhTiCHfQJv4pwMrLrpUxTKGLE4oRD6pvflsU,3706
|
|
255
255
|
akshare/stock/stock_hot_rank_em.py,sha256=F466GuUgtlJbaCdD4v8TDCV-d7PxnetEI-zRz0OTvnA,7331
|
|
256
256
|
akshare/stock/stock_hot_search_baidu.py,sha256=nEPIgtwe0DmShUQxS6dJWG0UYlRS0zuSJTX_r8KsdEA,1762
|
|
257
257
|
akshare/stock/stock_hot_up_em.py,sha256=sRwbpAHLzAylobUAIlVKuQo8vbuTA0Jt6gb1oiSgNwA,2509
|
|
@@ -381,8 +381,8 @@ akshare/utils/token_process.py,sha256=K4rGXjh_tgugbRcyOK2h2x0jP3PT65IIK7nxhUKhOe
|
|
|
381
381
|
akshare/utils/tqdm.py,sha256=MuPNwcswkOGjwWQOMWXi9ZvQ_RmW4obCWRj2i7HM7FE,847
|
|
382
382
|
tests/__init__.py,sha256=gNzhlO0UPjFq6Ieb38kaVIODXv4cTDByrdohAZnDYt4,82
|
|
383
383
|
tests/test_func.py,sha256=tfvy_YnYmDra2dkKZ5JvprU1gNW5X9T634PszdSdH1A,944
|
|
384
|
-
akshare-1.14.
|
|
385
|
-
akshare-1.14.
|
|
386
|
-
akshare-1.14.
|
|
387
|
-
akshare-1.14.
|
|
388
|
-
akshare-1.14.
|
|
384
|
+
akshare-1.14.41.dist-info/LICENSE,sha256=mmSZCPgfHiVw34LXuFArd-SUgQtBJ_QsIlh-kWlDHfs,1073
|
|
385
|
+
akshare-1.14.41.dist-info/METADATA,sha256=Eh8i32MKU0DfY_KhBP7tSKGfsAhSbQtyRuOcqfLZ-t4,13976
|
|
386
|
+
akshare-1.14.41.dist-info/WHEEL,sha256=Wyh-_nZ0DJYolHNn1_hMa4lM7uDedD_RGVwbmTjyItk,91
|
|
387
|
+
akshare-1.14.41.dist-info/top_level.txt,sha256=jsf9ZzZPmHaISTVumQPsAw7vv7Yv-PdEVW70SMEelQQ,14
|
|
388
|
+
akshare-1.14.41.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|