akshare 1.16.61__py3-none-any.whl → 1.16.63__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.
- akshare/__init__.py +3 -1
- akshare/stock_feature/stock_board_concept_ths.py +44 -2
- akshare/stock_feature/stock_gdfx_em.py +37 -15
- akshare/stock_fundamental/stock_finance_us_em.py +45 -11
- {akshare-1.16.61.dist-info → akshare-1.16.63.dist-info}/METADATA +3 -3
- {akshare-1.16.61.dist-info → akshare-1.16.63.dist-info}/RECORD +9 -9
- {akshare-1.16.61.dist-info → akshare-1.16.63.dist-info}/WHEEL +1 -1
- {akshare-1.16.61.dist-info → akshare-1.16.63.dist-info}/licenses/LICENSE +0 -0
- {akshare-1.16.61.dist-info → akshare-1.16.63.dist-info}/top_level.txt +0 -0
akshare/__init__.py
CHANGED
@@ -3070,9 +3070,11 @@ amac_manager_cancelled_info # 中国证券投资基金业协会-信息公示-诚
|
|
3070
3070
|
1.16.59 fix: fix option_czce_hist interface
|
3071
3071
|
1.16.60 fix: fix stock_individual_fund_flow_rank interface
|
3072
3072
|
1.16.61 fix: fix stock_board_concept_index_ths interface
|
3073
|
+
1.16.62 fix: fix stock_gdfx_free_holding_change_em interface
|
3074
|
+
1.16.63 fix: fix stock_board_concept_name_ths interface
|
3073
3075
|
"""
|
3074
3076
|
|
3075
|
-
__version__ = "1.16.
|
3077
|
+
__version__ = "1.16.63"
|
3076
3078
|
__author__ = "AKFamily"
|
3077
3079
|
|
3078
3080
|
import sys
|
@@ -1,11 +1,12 @@
|
|
1
1
|
#!/usr/bin/env python
|
2
2
|
# -*- coding:utf-8 -*-
|
3
3
|
"""
|
4
|
-
Date: 2025/
|
4
|
+
Date: 2025/3/27 14:20
|
5
5
|
Desc: 同花顺-板块-概念板块
|
6
6
|
https://q.10jqka.com.cn/thshy/
|
7
7
|
"""
|
8
8
|
|
9
|
+
from typing import Dict
|
9
10
|
from datetime import datetime
|
10
11
|
from functools import lru_cache
|
11
12
|
from io import StringIO
|
@@ -62,6 +63,8 @@ def _get_stock_board_concept_name_ths() -> dict:
|
|
62
63
|
for item in soup.find(name="div", attrs={"class": "cate_inner"}).find_all("a")
|
63
64
|
]
|
64
65
|
name_code_map = dict(zip(name_list, code_list))
|
66
|
+
temp_dict = __stock_board_concept_summary_ths()
|
67
|
+
name_code_map.update(temp_dict)
|
65
68
|
return name_code_map
|
66
69
|
|
67
70
|
|
@@ -228,6 +231,45 @@ def stock_board_concept_index_ths(
|
|
228
231
|
return big_df
|
229
232
|
|
230
233
|
|
234
|
+
@lru_cache()
|
235
|
+
def __stock_board_concept_summary_ths() -> Dict:
|
236
|
+
"""
|
237
|
+
同花顺-数据中心-概念板块-概念时间表-辅助函数
|
238
|
+
https://q.10jqka.com.cn/gn/
|
239
|
+
:return: 概念时间表
|
240
|
+
:rtype: dict
|
241
|
+
"""
|
242
|
+
js_code = py_mini_racer.MiniRacer()
|
243
|
+
js_content = _get_file_content_ths("ths.js")
|
244
|
+
js_code.eval(js_content)
|
245
|
+
v_code = js_code.call("v")
|
246
|
+
headers = {
|
247
|
+
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) "
|
248
|
+
"Chrome/89.0.4389.90 Safari/537.36",
|
249
|
+
"Cookie": f"v={v_code}",
|
250
|
+
}
|
251
|
+
url = "http://q.10jqka.com.cn/gn/index/field/addtime/order/desc/page/1/ajax/1/"
|
252
|
+
r = requests.get(url, headers=headers)
|
253
|
+
soup = BeautifulSoup(r.text, features="lxml")
|
254
|
+
page_num = soup.find(name="span", attrs={"class": "page_info"}).text.split("/")[1]
|
255
|
+
big_dict = dict()
|
256
|
+
tqdm = get_tqdm()
|
257
|
+
for page in tqdm(range(1, int(page_num) + 1), leave=False):
|
258
|
+
url = f"http://q.10jqka.com.cn/gn/index/field/addtime/order/desc/page/{page}/ajax/1/"
|
259
|
+
r = requests.get(url, headers=headers)
|
260
|
+
try:
|
261
|
+
soup = BeautifulSoup(r.text, features="lxml")
|
262
|
+
temp_dict = {
|
263
|
+
item.get_text(): item["href"].rsplit("/")[-2]
|
264
|
+
for item in soup.find_all(name="a")
|
265
|
+
if "detail" in item["href"]
|
266
|
+
}
|
267
|
+
big_dict.update(temp_dict)
|
268
|
+
except ValueError:
|
269
|
+
break
|
270
|
+
return big_dict
|
271
|
+
|
272
|
+
|
231
273
|
def stock_board_concept_summary_ths() -> pd.DataFrame:
|
232
274
|
"""
|
233
275
|
同花顺-数据中心-概念板块-概念时间表
|
@@ -273,7 +315,7 @@ if __name__ == "__main__":
|
|
273
315
|
print(stock_board_concept_info_ths_df)
|
274
316
|
|
275
317
|
stock_board_concept_index_ths_df = stock_board_concept_index_ths(
|
276
|
-
symbol="
|
318
|
+
symbol="DeepSeek概念", start_date="20200101", end_date="20250321"
|
277
319
|
)
|
278
320
|
print(stock_board_concept_index_ths_df)
|
279
321
|
|
@@ -1,14 +1,15 @@
|
|
1
1
|
# -*- coding:utf-8 -*-
|
2
2
|
# !/usr/bin/env python
|
3
3
|
"""
|
4
|
-
Date:
|
4
|
+
Date: 2025/3/26 21:15
|
5
5
|
Desc: 东方财富网-数据中心-股东分析
|
6
6
|
https://data.eastmoney.com/gdfx/
|
7
7
|
"""
|
8
8
|
|
9
9
|
import pandas as pd
|
10
10
|
import requests
|
11
|
-
|
11
|
+
|
12
|
+
from akshare.utils.tqdm import get_tqdm
|
12
13
|
|
13
14
|
|
14
15
|
def stock_gdfx_free_holding_statistics_em(
|
@@ -38,12 +39,13 @@ def stock_gdfx_free_holding_statistics_em(
|
|
38
39
|
data_json = r.json()
|
39
40
|
total_page = data_json["result"]["pages"]
|
40
41
|
big_df = pd.DataFrame()
|
42
|
+
tqdm = get_tqdm()
|
41
43
|
for page in tqdm(range(1, total_page + 1), leave=False):
|
42
44
|
params.update({"pageNumber": page})
|
43
45
|
r = requests.get(url, params=params)
|
44
46
|
data_json = r.json()
|
45
47
|
temp_df = pd.DataFrame(data_json["result"]["data"])
|
46
|
-
big_df = pd.concat([big_df, temp_df], ignore_index=True)
|
48
|
+
big_df = pd.concat(objs=[big_df, temp_df], ignore_index=True)
|
47
49
|
big_df.reset_index(inplace=True)
|
48
50
|
big_df["index"] = big_df.index + 1
|
49
51
|
big_df.columns = [
|
@@ -139,6 +141,7 @@ def stock_gdfx_holding_statistics_em(date: str = "20210930") -> pd.DataFrame:
|
|
139
141
|
data_json = r.json()
|
140
142
|
total_page = data_json["result"]["pages"]
|
141
143
|
big_df = pd.DataFrame()
|
144
|
+
tqdm = get_tqdm()
|
142
145
|
for page in tqdm(range(1, total_page + 1), leave=False):
|
143
146
|
params.update({"pageNumber": page})
|
144
147
|
r = requests.get(url, params=params)
|
@@ -241,12 +244,13 @@ def stock_gdfx_free_holding_change_em(date: str = "20210930") -> pd.DataFrame:
|
|
241
244
|
data_json = r.json()
|
242
245
|
total_page = data_json["result"]["pages"]
|
243
246
|
big_df = pd.DataFrame()
|
247
|
+
tqdm = get_tqdm()
|
244
248
|
for page in tqdm(range(1, total_page + 1), leave=False):
|
245
249
|
params.update({"pageNumber": page})
|
246
250
|
r = requests.get(url, params=params)
|
247
251
|
data_json = r.json()
|
248
252
|
temp_df = pd.DataFrame(data_json["result"]["data"])
|
249
|
-
big_df = pd.concat([big_df, temp_df], ignore_index=True)
|
253
|
+
big_df = pd.concat(objs=[big_df, temp_df], ignore_index=True)
|
250
254
|
|
251
255
|
big_df.reset_index(inplace=True)
|
252
256
|
big_df["index"] = big_df.index + 1
|
@@ -269,6 +273,7 @@ def stock_gdfx_free_holding_change_em(date: str = "20210930") -> pd.DataFrame:
|
|
269
273
|
"流通市值统计",
|
270
274
|
"持有个股",
|
271
275
|
"-",
|
276
|
+
"-",
|
272
277
|
]
|
273
278
|
big_df = big_df[
|
274
279
|
[
|
@@ -284,12 +289,22 @@ def stock_gdfx_free_holding_change_em(date: str = "20210930") -> pd.DataFrame:
|
|
284
289
|
"持有个股",
|
285
290
|
]
|
286
291
|
]
|
287
|
-
big_df["期末持股只数统计-总持有"] = pd.to_numeric(
|
288
|
-
|
289
|
-
|
290
|
-
big_df["
|
291
|
-
|
292
|
-
|
292
|
+
big_df["期末持股只数统计-总持有"] = pd.to_numeric(
|
293
|
+
big_df["期末持股只数统计-总持有"], errors="coerce"
|
294
|
+
)
|
295
|
+
big_df["期末持股只数统计-新进"] = pd.to_numeric(
|
296
|
+
big_df["期末持股只数统计-新进"], errors="coerce"
|
297
|
+
)
|
298
|
+
big_df["期末持股只数统计-增加"] = pd.to_numeric(
|
299
|
+
big_df["期末持股只数统计-增加"], errors="coerce"
|
300
|
+
)
|
301
|
+
big_df["期末持股只数统计-不变"] = pd.to_numeric(
|
302
|
+
big_df["期末持股只数统计-不变"], errors="coerce"
|
303
|
+
)
|
304
|
+
big_df["期末持股只数统计-减少"] = pd.to_numeric(
|
305
|
+
big_df["期末持股只数统计-减少"], errors="coerce"
|
306
|
+
)
|
307
|
+
big_df["流通市值统计"] = pd.to_numeric(big_df["流通市值统计"], errors="coerce")
|
293
308
|
return big_df
|
294
309
|
|
295
310
|
|
@@ -318,12 +333,13 @@ def stock_gdfx_holding_change_em(date: str = "20210930") -> pd.DataFrame:
|
|
318
333
|
data_json = r.json()
|
319
334
|
total_page = data_json["result"]["pages"]
|
320
335
|
big_df = pd.DataFrame()
|
336
|
+
tqdm = get_tqdm()
|
321
337
|
for page in tqdm(range(1, total_page + 1), leave=False):
|
322
338
|
params.update({"pageNumber": page})
|
323
339
|
r = requests.get(url, params=params)
|
324
340
|
data_json = r.json()
|
325
341
|
temp_df = pd.DataFrame(data_json["result"]["data"])
|
326
|
-
big_df = pd.concat([big_df, temp_df], ignore_index=True)
|
342
|
+
big_df = pd.concat(objs=[big_df, temp_df], ignore_index=True)
|
327
343
|
|
328
344
|
big_df.reset_index(inplace=True)
|
329
345
|
big_df["index"] = big_df.index + 1
|
@@ -507,6 +523,7 @@ def stock_gdfx_free_holding_detail_em(date: str = "20210930") -> pd.DataFrame:
|
|
507
523
|
data_json = r.json()
|
508
524
|
total_page = data_json["result"]["pages"]
|
509
525
|
big_df = pd.DataFrame()
|
526
|
+
tqdm = get_tqdm()
|
510
527
|
for page in tqdm(range(1, total_page + 1), leave=False):
|
511
528
|
params.update({"pageNumber": page})
|
512
529
|
r = requests.get(url, params=params)
|
@@ -600,6 +617,7 @@ def stock_gdfx_holding_detail_em(
|
|
600
617
|
data_json = r.json()
|
601
618
|
total_page = data_json["result"]["pages"]
|
602
619
|
big_df = pd.DataFrame()
|
620
|
+
tqdm = get_tqdm()
|
603
621
|
for page in tqdm(range(1, total_page + 1), leave=False):
|
604
622
|
params.update({"pageNumber": page})
|
605
623
|
r = requests.get(url, params=params)
|
@@ -686,12 +704,13 @@ def stock_gdfx_free_holding_analyse_em(date: str = "20230930") -> pd.DataFrame:
|
|
686
704
|
data_json = r.json()
|
687
705
|
total_page = data_json["result"]["pages"]
|
688
706
|
big_df = pd.DataFrame()
|
707
|
+
tqdm = get_tqdm()
|
689
708
|
for page in tqdm(range(1, total_page + 1), leave=False):
|
690
709
|
params.update({"pageNumber": page})
|
691
710
|
r = requests.get(url, params=params)
|
692
711
|
data_json = r.json()
|
693
712
|
temp_df = pd.DataFrame(data_json["result"]["data"])
|
694
|
-
big_df = pd.concat([big_df, temp_df], ignore_index=True)
|
713
|
+
big_df = pd.concat(objs=[big_df, temp_df], ignore_index=True)
|
695
714
|
|
696
715
|
big_df.reset_index(inplace=True)
|
697
716
|
big_df["index"] = big_df.index + 1
|
@@ -783,12 +802,13 @@ def stock_gdfx_holding_analyse_em(date: str = "20230331") -> pd.DataFrame:
|
|
783
802
|
data_json = r.json()
|
784
803
|
total_page = data_json["result"]["pages"]
|
785
804
|
big_df = pd.DataFrame()
|
805
|
+
tqdm = get_tqdm()
|
786
806
|
for page in tqdm(range(1, total_page + 1), leave=False):
|
787
807
|
params.update({"pageNumber": page})
|
788
808
|
r = requests.get(url, params=params)
|
789
809
|
data_json = r.json()
|
790
810
|
temp_df = pd.DataFrame(data_json["result"]["data"])
|
791
|
-
big_df = pd.concat([big_df, temp_df], ignore_index=True)
|
811
|
+
big_df = pd.concat(objs=[big_df, temp_df], ignore_index=True)
|
792
812
|
|
793
813
|
big_df.reset_index(inplace=True)
|
794
814
|
big_df["index"] = big_df["index"] + 1
|
@@ -886,12 +906,13 @@ def stock_gdfx_free_holding_teamwork_em(symbol: str = "社保") -> pd.DataFrame:
|
|
886
906
|
data_json = r.json()
|
887
907
|
total_page = data_json["result"]["pages"]
|
888
908
|
big_df = pd.DataFrame()
|
909
|
+
tqdm = get_tqdm()
|
889
910
|
for page in tqdm(range(1, total_page + 1), leave=False):
|
890
911
|
params.update({"pageNumber": page})
|
891
912
|
r = requests.get(url, params=params)
|
892
913
|
data_json = r.json()
|
893
914
|
temp_df = pd.DataFrame(data_json["result"]["data"])
|
894
|
-
big_df = pd.concat([big_df, temp_df], ignore_index=True)
|
915
|
+
big_df = pd.concat(objs=[big_df, temp_df], ignore_index=True)
|
895
916
|
|
896
917
|
big_df.reset_index(inplace=True)
|
897
918
|
big_df["index"] = big_df.index + 1
|
@@ -948,12 +969,13 @@ def stock_gdfx_holding_teamwork_em(symbol: str = "社保") -> pd.DataFrame:
|
|
948
969
|
data_json = r.json()
|
949
970
|
total_page = data_json["result"]["pages"]
|
950
971
|
big_df = pd.DataFrame()
|
972
|
+
tqdm = get_tqdm()
|
951
973
|
for page in tqdm(range(1, total_page + 1), leave=False):
|
952
974
|
params.update({"pageNumber": page})
|
953
975
|
r = requests.get(url, params=params)
|
954
976
|
data_json = r.json()
|
955
977
|
temp_df = pd.DataFrame(data_json["result"]["data"])
|
956
|
-
big_df = pd.concat([big_df, temp_df], ignore_index=True)
|
978
|
+
big_df = pd.concat(objs=[big_df, temp_df], ignore_index=True)
|
957
979
|
|
958
980
|
big_df.reset_index(inplace=True)
|
959
981
|
big_df["index"] = big_df.index + 1
|
@@ -1,7 +1,7 @@
|
|
1
1
|
#!/usr/bin/env python
|
2
2
|
# -*- coding:utf-8 -*-
|
3
3
|
"""
|
4
|
-
Date: 2025/3/
|
4
|
+
Date: 2025/3/27 14:00
|
5
5
|
Desc: 美股-基本面数据
|
6
6
|
https://emweb.eastmoney.com/PC_USF10/pages/index.html?code=TSLA&type=web&color=w#/cwfx
|
7
7
|
"""
|
@@ -12,12 +12,43 @@ import requests
|
|
12
12
|
from akshare.utils.cons import headers
|
13
13
|
|
14
14
|
|
15
|
+
def __stock_financial_us_report_query_market_em(symbol: str = "TSLA") -> str:
|
16
|
+
"""
|
17
|
+
东方财富-美股-财务分析-三大报表-查询市场
|
18
|
+
https://emweb.eastmoney.com/PC_USF10/pages/index.html?code=TSLA&type=web&color=w#/cwfx
|
19
|
+
:param symbol: choice of {"资产负债表", "综合损益表", "现金流量表"}
|
20
|
+
:type symbol: str
|
21
|
+
:return: 查询市场
|
22
|
+
:rtype: str
|
23
|
+
"""
|
24
|
+
url = "https://datacenter.eastmoney.com/securities/api/data/v1/get"
|
25
|
+
params = {
|
26
|
+
"reportName": "RPT_USF10_INFO_ORGPROFILE",
|
27
|
+
"columns": "SECUCODE,SECURITY_CODE,ORG_CODE,SECURITY_INNER_CODE,ORG_NAME,ORG_EN_ABBR,BELONG_INDUSTRY,"
|
28
|
+
"FOUND_DATE,CHAIRMAN,REG_PLACE,ADDRESS,EMP_NUM,ORG_TEL,ORG_FAX,ORG_EMAIL,ORG_WEB,ORG_PROFILE",
|
29
|
+
"quoteColumns": "",
|
30
|
+
"filter": f'(SECURITY_CODE="{symbol}")',
|
31
|
+
"pageNumber": "1",
|
32
|
+
"pageSize": "200",
|
33
|
+
"sortTypes": "",
|
34
|
+
"sortColumns": "",
|
35
|
+
"source": "SECURITIES",
|
36
|
+
"client": "PC",
|
37
|
+
"v": "04406064331266868",
|
38
|
+
}
|
39
|
+
|
40
|
+
r = requests.get(url, params=params)
|
41
|
+
data_json = r.json()
|
42
|
+
stock_code = data_json["result"]["data"][0]["SECUCODE"]
|
43
|
+
return stock_code
|
44
|
+
|
45
|
+
|
15
46
|
def __stock_financial_us_report_em(
|
16
47
|
stock: str = "TSLA", symbol: str = "综合损益表", indicator: str = "年报"
|
17
48
|
) -> str:
|
18
49
|
"""
|
19
50
|
东方财富-美股-财务分析-三大报表
|
20
|
-
https://emweb.
|
51
|
+
https://emweb.eastmoney.com/PC_USF10/pages/index.html?code=TSLA&type=web&color=w#/cwfx
|
21
52
|
:param stock: 股票代码
|
22
53
|
:type stock: str
|
23
54
|
:param symbol: choice of {"资产负债表", "综合损益表", "现金流量表"}
|
@@ -28,6 +59,7 @@ def __stock_financial_us_report_em(
|
|
28
59
|
:rtype: str
|
29
60
|
"""
|
30
61
|
url = "https://datacenter.eastmoney.com/securities/api/data/v1/get"
|
62
|
+
stock = __stock_financial_us_report_query_market_em(stock)
|
31
63
|
if symbol == "资产负债表":
|
32
64
|
report_name = "RPT_USF10_FN_BALANCE"
|
33
65
|
elif symbol == "综合损益表":
|
@@ -41,7 +73,7 @@ def __stock_financial_us_report_em(
|
|
41
73
|
"columns": "SECUCODE,SECURITY_CODE,SECURITY_NAME_ABBR,REPORT,REPORT_DATE,FISCAL_YEAR,CURRENCY,"
|
42
74
|
"ACCOUNT_STANDARD,REPORT_TYPE,DATE_TYPE_CODE",
|
43
75
|
"quoteColumns": "",
|
44
|
-
"filter": f'(SECUCODE="{stock}
|
76
|
+
"filter": f'(SECUCODE="{stock}")',
|
45
77
|
"pageNumber": "",
|
46
78
|
"pageSize": "",
|
47
79
|
"sortTypes": "-1",
|
@@ -77,7 +109,7 @@ def stock_financial_us_report_em(
|
|
77
109
|
) -> pd.DataFrame:
|
78
110
|
"""
|
79
111
|
东方财富-美股-财务分析-三大报表
|
80
|
-
https://emweb.
|
112
|
+
https://emweb.eastmoney.com/PC_USF10/pages/index.html?code=TSLA&type=web&color=w#/cwfx
|
81
113
|
:param stock: 股票代码
|
82
114
|
:type stock: str
|
83
115
|
:param symbol: choice of {"资产负债表", "综合损益表", "现金流量表"}
|
@@ -91,6 +123,7 @@ def stock_financial_us_report_em(
|
|
91
123
|
date_str = __stock_financial_us_report_em(
|
92
124
|
stock=stock, symbol=symbol, indicator=indicator
|
93
125
|
)
|
126
|
+
stock = __stock_financial_us_report_query_market_em(stock)
|
94
127
|
if symbol == "资产负债表":
|
95
128
|
report_name = "RPT_USF10_FN_BALANCE"
|
96
129
|
elif symbol == "综合损益表":
|
@@ -104,7 +137,7 @@ def stock_financial_us_report_em(
|
|
104
137
|
"columns": "SECUCODE,SECURITY_CODE,SECURITY_NAME_ABBR,REPORT_DATE,REPORT_TYPE,REPORT,"
|
105
138
|
"STD_ITEM_CODE,AMOUNT,ITEM_NAME",
|
106
139
|
"quoteColumns": "",
|
107
|
-
"filter": f'(SECUCODE="{stock}
|
140
|
+
"filter": f'(SECUCODE="{stock}")(REPORT in ' + date_str + ")",
|
108
141
|
"pageNumber": "",
|
109
142
|
"pageSize": "",
|
110
143
|
"sortTypes": "1,-1",
|
@@ -124,7 +157,7 @@ def stock_financial_us_analysis_indicator_em(
|
|
124
157
|
) -> pd.DataFrame:
|
125
158
|
"""
|
126
159
|
东方财富-美股-财务分析-主要指标
|
127
|
-
https://emweb.eastmoney.com/PC_USF10/pages/index.html?code=TSLA&type=web&color=w#/cwfx
|
160
|
+
https://emweb.eastmoney.com/PC_USF10/pages/index.html?code=TSLA&type=web&color=w#/cwfx
|
128
161
|
:param symbol: 股票代码
|
129
162
|
:type symbol: str
|
130
163
|
:param indicator: choice of {"年报", "单季报", "累计季报"}
|
@@ -133,6 +166,7 @@ def stock_financial_us_analysis_indicator_em(
|
|
133
166
|
:rtype: pandas.DataFrame
|
134
167
|
"""
|
135
168
|
url = "https://datacenter.eastmoney.com/securities/api/data/v1/get"
|
169
|
+
symbol = __stock_financial_us_report_query_market_em(symbol)
|
136
170
|
params = {
|
137
171
|
"reportName": "RPT_USF10_FN_GMAININDICATOR",
|
138
172
|
"columns": "USF10_FN_GMAININDICATOR",
|
@@ -146,16 +180,16 @@ def stock_financial_us_analysis_indicator_em(
|
|
146
180
|
"v": "01975982096513973",
|
147
181
|
}
|
148
182
|
if indicator == "年报":
|
149
|
-
params.update({"filter": f"""(SECUCODE="{symbol}
|
183
|
+
params.update({"filter": f"""(SECUCODE="{symbol}")(DATE_TYPE_CODE="001")"""})
|
150
184
|
elif indicator == "单季报":
|
151
185
|
params.update(
|
152
186
|
{
|
153
|
-
"filter": f"""(SECUCODE="{symbol}
|
187
|
+
"filter": f"""(SECUCODE="{symbol}")(DATE_TYPE_CODE in ("003","006","007","008"))"""
|
154
188
|
}
|
155
189
|
)
|
156
190
|
elif indicator == "累计季报":
|
157
191
|
params.update(
|
158
|
-
{"filter": f"""(SECUCODE="{symbol}
|
192
|
+
{"filter": f"""(SECUCODE="{symbol}")(DATE_TYPE_CODE in ("002","004"))"""}
|
159
193
|
)
|
160
194
|
else:
|
161
195
|
raise ValueError("请输入正确的 indicator 参数")
|
@@ -167,7 +201,7 @@ def stock_financial_us_analysis_indicator_em(
|
|
167
201
|
|
168
202
|
if __name__ == "__main__":
|
169
203
|
stock_financial_us_analysis_indicator_em_df = (
|
170
|
-
stock_financial_us_analysis_indicator_em(symbol="
|
204
|
+
stock_financial_us_analysis_indicator_em(symbol="BABA", indicator="年报")
|
171
205
|
)
|
172
206
|
print(stock_financial_us_analysis_indicator_em_df)
|
173
207
|
|
@@ -182,7 +216,7 @@ if __name__ == "__main__":
|
|
182
216
|
print(stock_financial_us_analysis_indicator_em_df)
|
183
217
|
|
184
218
|
stock_financial_us_report_em_df = stock_financial_us_report_em(
|
185
|
-
stock="
|
219
|
+
stock="BABA", symbol="资产负债表", indicator="年报"
|
186
220
|
)
|
187
221
|
print(stock_financial_us_report_em_df)
|
188
222
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: akshare
|
3
|
-
Version: 1.16.
|
3
|
+
Version: 1.16.63
|
4
4
|
Summary: AKShare is an elegant and simple financial data interface library for Python, built for human beings!
|
5
5
|
Home-page: https://github.com/akfamily/akshare
|
6
6
|
Author: AKFamily
|
@@ -53,8 +53,8 @@ Dynamic: requires-dist
|
|
53
53
|
Dynamic: requires-python
|
54
54
|
Dynamic: summary
|
55
55
|
|
56
|
-
|
57
|
-
|
56
|
+
**欢迎加入专注于财经数据和量化投研的知识社区,获取《财经数据宝典》和《量化投研宝典》,其汇集了财经数据和量化投研的多年经验,
|
57
|
+
还独家分享了众多国内外财经数据源的使用和注意事项,请点击[了解更多](https://akshare.akfamily.xyz/learn.html)**。
|
58
58
|
|
59
59
|
**量化投研视频课程:《PyBroker-入门及实战》已经上架!《PyBroker-进阶及实战》正在更新!**
|
60
60
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
akshare/__init__.py,sha256=
|
1
|
+
akshare/__init__.py,sha256=ou7Fk2F4vfpfFYRCsSJ_s-Ylk9-ivvkr5YwKXDqvOL0,192265
|
2
2
|
akshare/datasets.py,sha256=rKuRNZrqi6IMsZ9nyvO3Rx02js0tH3zMLjz8HQNAoPQ,963
|
3
3
|
akshare/exceptions.py,sha256=WEJjIhSmJ_xXNW6grwV4nufE_cfmmyuhmueVGiN1VAg,878
|
4
4
|
akshare/request.py,sha256=HtFFf9MhfEibR-ETWe-1Tts6ELU4VKSqA-ghaXjegQM,4252
|
@@ -301,7 +301,7 @@ akshare/stock_feature/stock_a_pe_and_pb.py,sha256=9HfjTSL_DTlAVvv7o3--pOdZiFwhRz
|
|
301
301
|
akshare/stock_feature/stock_account_em.py,sha256=PA-531xnv5uerFrYGc40mk8q8O0DGciHC_XVlE9udis,3342
|
302
302
|
akshare/stock_feature/stock_all_pb.py,sha256=2yQLq03qXNbTB5AtJ-Q8uJldOluElH5zTjYneY3aaZ0,1194
|
303
303
|
akshare/stock_feature/stock_analyst_em.py,sha256=Md3_G-Px0O1lk4dx5dCEKl8Vjgwt79Sh-FSh_sW1Elo,9508
|
304
|
-
akshare/stock_feature/stock_board_concept_ths.py,sha256=
|
304
|
+
akshare/stock_feature/stock_board_concept_ths.py,sha256=SsJ_kPbs4v9Tge25GLe3LA-meN-c_E_nAGHF3Hfi0IY,11265
|
305
305
|
akshare/stock_feature/stock_board_industry_ths.py,sha256=c22JP9MJGncLaqvBmkAxHUz3HKNMCKf58Rug9n2vlAU,15102
|
306
306
|
akshare/stock_feature/stock_buffett_index_lg.py,sha256=NpNccHmGjtqLz6aUladB6InPzO2pjoImbgCgmNEYUuM,2027
|
307
307
|
akshare/stock_feature/stock_classify_sina.py,sha256=Lg7ROG5W9HioFRplJI2rZ6tAAHM09N3g9qF6kReIQYI,3210
|
@@ -317,7 +317,7 @@ akshare/stock_feature/stock_fhps_em.py,sha256=Ex355qj1j_EfuM7ImObuFJoUUqpXO73a-z
|
|
317
317
|
akshare/stock_feature/stock_fhps_ths.py,sha256=NosH1xyT1Pif4T9tchdtJTBEpe6g1Wq2kjvxJDsZD_Y,1805
|
318
318
|
akshare/stock_feature/stock_fund_flow.py,sha256=cqBqsFrzwmuLP3k3wYQzvW085QUUfHZ4nBW8Zx7egkQ,18669
|
319
319
|
akshare/stock_feature/stock_gddh_em.py,sha256=N4sH_qF7LZvMs46t7eGtbnahNrEBQPDk6tRSP_1ModM,3563
|
320
|
-
akshare/stock_feature/stock_gdfx_em.py,sha256=
|
320
|
+
akshare/stock_feature/stock_gdfx_em.py,sha256=q1eauLZdbcpuonGSZYifY50XqvlDFFYny_KmZnGAV60,39103
|
321
321
|
akshare/stock_feature/stock_gdhs.py,sha256=Z6ZMy1A03BqMu9TghcIu2Sd_wwEtpIH7qawHun9G7ns,9036
|
322
322
|
akshare/stock_feature/stock_gdzjc_em.py,sha256=SHJH5iS3_NhvjTqRXF0vPooZl0s_ASeyZmNCC50ZYqs,4426
|
323
323
|
akshare/stock_feature/stock_gpzy_em.py,sha256=FgyjVgdoxrtMM7WwxdQJxK0mYGJklIHaT9KmMCFmEPM,17869
|
@@ -367,7 +367,7 @@ akshare/stock_fundamental/stock_basic_info_xq.py,sha256=PJveGTe3NG5F5owYdLFbpC6e
|
|
367
367
|
akshare/stock_fundamental/stock_finance_hk_em.py,sha256=cCiaWX6ZyKe4W2H9qe-ttpMeVMWp6tHdvnjhRuYQhl8,7017
|
368
368
|
akshare/stock_fundamental/stock_finance_sina.py,sha256=432EjGHWFtG0L32PNSC_HWpVLDntabNt9koyUtNG77E,30718
|
369
369
|
akshare/stock_fundamental/stock_finance_ths.py,sha256=nS9bt_hzklzh7pBTCH1PjOa69OUcNZ41Z_zSHiz9Y1U,11527
|
370
|
-
akshare/stock_fundamental/stock_finance_us_em.py,sha256=
|
370
|
+
akshare/stock_fundamental/stock_finance_us_em.py,sha256=thRKe9OIfZFQ0q_kAM2kJXCKXGhyPFjHKiiGEK95K2g,9799
|
371
371
|
akshare/stock_fundamental/stock_hold.py,sha256=h8V5v_0YOi3FJPc1w95WBaO0v3n87lcufcUlu-i6XXk,5394
|
372
372
|
akshare/stock_fundamental/stock_ipo_declare.py,sha256=18j2542TT2nCJ1HWBcT6-HupRbXvesA30qqejknn-kM,1809
|
373
373
|
akshare/stock_fundamental/stock_kcb_detail_sse.py,sha256=MBanq3sDvb0OTbUl_gg7avDUQg_3Ugzqr43cB43fp60,940
|
@@ -392,10 +392,10 @@ akshare/utils/func.py,sha256=4cwmXFztU86yJNONJ40KJLvsIEQHBbct4iMm3zT2v30,2315
|
|
392
392
|
akshare/utils/multi_decrypt.py,sha256=aWoL2iEPeuXHJg8-n7OtMKixLnIhfzepACgxfrfmQB4,1657
|
393
393
|
akshare/utils/token_process.py,sha256=K4rGXjh_tgugbRcyOK2h2x0jP3PT65IIK7nxhUKhOeQ,666
|
394
394
|
akshare/utils/tqdm.py,sha256=MuPNwcswkOGjwWQOMWXi9ZvQ_RmW4obCWRj2i7HM7FE,847
|
395
|
-
akshare-1.16.
|
395
|
+
akshare-1.16.63.dist-info/licenses/LICENSE,sha256=mmSZCPgfHiVw34LXuFArd-SUgQtBJ_QsIlh-kWlDHfs,1073
|
396
396
|
tests/__init__.py,sha256=gNzhlO0UPjFq6Ieb38kaVIODXv4cTDByrdohAZnDYt4,82
|
397
397
|
tests/test_func.py,sha256=j1MGYbZI2if2j_LY1S4FLsf4qfq4NwVqD5wmRlv5Log,832
|
398
|
-
akshare-1.16.
|
399
|
-
akshare-1.16.
|
400
|
-
akshare-1.16.
|
401
|
-
akshare-1.16.
|
398
|
+
akshare-1.16.63.dist-info/METADATA,sha256=orbPq4oAuVnI83DaiTTyzMfCRFRBIc2SFFV5FZ2mfSs,13767
|
399
|
+
akshare-1.16.63.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
400
|
+
akshare-1.16.63.dist-info/top_level.txt,sha256=jsf9ZzZPmHaISTVumQPsAw7vv7Yv-PdEVW70SMEelQQ,14
|
401
|
+
akshare-1.16.63.dist-info/RECORD,,
|
File without changes
|
File without changes
|