akshare 1.14.42__py3-none-any.whl → 1.14.43__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 CHANGED
@@ -2853,9 +2853,10 @@ amac_manager_cancelled_info # 中国证券投资基金业协会-信息公示-诚
2853
2853
  1.14.40 fix: fix fund_open_fund_rank_em interface
2854
2854
  1.14.41 fix: fix fund_report_asset_allocation_cninfo interface
2855
2855
  1.14.42 fix: fix stock_new_gh_cninfo interface
2856
+ 1.14.43 fix: fix stock_share_change_cninfo interface
2856
2857
  """
2857
2858
 
2858
- __version__ = "1.14.42"
2859
+ __version__ = "1.14.43"
2859
2860
  __author__ = "AKFamily"
2860
2861
 
2861
2862
  import sys
@@ -4823,15 +4824,6 @@ from akshare.stock_feature.stock_jgdy_em import (
4823
4824
  stock_jgdy_detail_em,
4824
4825
  )
4825
4826
 
4826
- """
4827
- IT桔子
4828
- """
4829
- from akshare.fortune.fortune_it_juzi import (
4830
- death_company,
4831
- maxima_company,
4832
- nicorn_company,
4833
- )
4834
-
4835
4827
  """
4836
4828
  新浪主力连续接口
4837
4829
  """
@@ -1,9 +1,9 @@
1
1
  # -*- coding:utf-8 -*-
2
2
  # !/usr/bin/env python
3
3
  """
4
- Date: 2024/6/4 19:20
4
+ Date: 2024/7/26 18:20
5
5
  Desc: 巨潮资讯-股本股东-公司股本变动
6
- http://webapi.cninfo.com.cn/api/stock/p_stock2215
6
+ https://webapi.cninfo.com.cn/api/stock/p_stock2215
7
7
  """
8
8
 
9
9
  import pandas as pd
@@ -34,7 +34,7 @@ def stock_share_change_cninfo(
34
34
  ) -> pd.DataFrame:
35
35
  """
36
36
  巨潮资讯-股本股东-公司股本变动
37
- http://webapi.cninfo.com.cn/#/apiDoc
37
+ https://webapi.cninfo.com.cn/#/apiDoc
38
38
  查询 p_stock2215 接口
39
39
  :param symbol: 股票代码
40
40
  :type symbol: str
@@ -45,7 +45,7 @@ def stock_share_change_cninfo(
45
45
  :return: 公司股本变动
46
46
  :rtype: pandas.DataFrame
47
47
  """
48
- url = "http://webapi.cninfo.com.cn/api/stock/p_stock2215"
48
+ url = "https://webapi.cninfo.com.cn/api/stock/p_stock2215"
49
49
  params = {
50
50
  "scode": symbol,
51
51
  "sdate": "-".join([start_date[:4], start_date[4:6], start_date[6:]]),
@@ -63,10 +63,10 @@ def stock_share_change_cninfo(
63
63
  "Cache-Control": "no-cache",
64
64
  "Content-Length": "0",
65
65
  "Host": "webapi.cninfo.com.cn",
66
- "Origin": "http://webapi.cninfo.com.cn",
66
+ "Origin": "https://webapi.cninfo.com.cn",
67
67
  "Pragma": "no-cache",
68
68
  "Proxy-Connection": "keep-alive",
69
- "Referer": "http://webapi.cninfo.com.cn/",
69
+ "Referer": "https://webapi.cninfo.com.cn/",
70
70
  "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) "
71
71
  "Chrome/93.0.4577.63 Safari/537.36",
72
72
  "X-Requested-With": "XMLHttpRequest",
@@ -125,8 +125,8 @@ def stock_share_change_cninfo(
125
125
  ignore_cols = ["最新记录标识", "其他"]
126
126
  temp_df.rename(columns=cols_map, inplace=True)
127
127
  temp_df.fillna(pd.NA, inplace=True)
128
- temp_df["公告日期"] = pd.to_datetime(temp_df["公告日期"]).dt.date
129
- temp_df["变动日期"] = pd.to_datetime(temp_df["变动日期"]).dt.date
128
+ temp_df["公告日期"] = pd.to_datetime(temp_df["公告日期"], errors="coerce").dt.date
129
+ temp_df["变动日期"] = pd.to_datetime(temp_df["变动日期"], errors="coerce").dt.date
130
130
  data_df = temp_df[[c for c in temp_df.columns if c not in ignore_cols]]
131
131
  return data_df
132
132
 
@@ -135,6 +135,6 @@ if __name__ == "__main__":
135
135
  stock_share_change_cninfo_df = stock_share_change_cninfo(
136
136
  symbol="002594",
137
137
  start_date="20091227",
138
- end_date="20220713",
138
+ end_date="20240726",
139
139
  )
140
140
  print(stock_share_change_cninfo_df)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: akshare
3
- Version: 1.14.42
3
+ Version: 1.14.43
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
@@ -1,4 +1,4 @@
1
- akshare/__init__.py,sha256=Bu-6DN3lzU96wrdDyJbfIOFMtCWJGFGFGP4l3OEPl5k,179991
1
+ akshare/__init__.py,sha256=LnUwj18g8PkkIa_nNDH2ts2oLlOBepdIMaIQ75sn5eg,179919
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
@@ -79,7 +79,6 @@ akshare/fortune/fortune_500.py,sha256=2pYu_zZsXehpIdioMggl-QkNSclNOsIhM8_8Z5zHv5
79
79
  akshare/fortune/fortune_bloomberg.py,sha256=i5HqnICYXKmwy3rOvMLDzJPDJA_am8imKsXzNlLLU6g,3673
80
80
  akshare/fortune/fortune_forbes_500.py,sha256=GiHFZ_dLHkc3K03H1rfVQ0FEGbwOWjdF4CFlRXXWBIM,1437
81
81
  akshare/fortune/fortune_hurun.py,sha256=B2BMDdwsatY5Yo2hX03GBqMJyifPhQzsRTXhelVNs6s,11512
82
- akshare/fortune/fortune_it_juzi.py,sha256=B0kV1MZLyTOD4jvjGr2p-z9P8nvM0S6K6zYP3KLP65w,3257
83
82
  akshare/fortune/fortune_xincaifu_500.py,sha256=FvMenx3obef-BGQ3gQo8vbhkcAnUJipImWmor5-JOqk,1827
84
83
  akshare/fund/__init__.py,sha256=RMTf1bT5EOE3ttWpn3hGu1LtUmsVxDoa0W7W0gXHOy8,81
85
84
  akshare/fund/fund_amac.py,sha256=Dml3EgpJhmVgkttb0OdaWN41ynOCIbJ0-1qAPDWF0oo,33800
@@ -268,7 +267,7 @@ akshare/stock/stock_new_cninfo.py,sha256=EOuZowDLQSSHyPAwXcuPXbQkqhbz2nRBZsM7o2Z
268
267
  akshare/stock/stock_profile_cninfo.py,sha256=tiEPnoH7IGp9DV1kMQNGIXuVOWpQFl_BS_RX_ijM4BI,3163
269
268
  akshare/stock/stock_rank_forecast.py,sha256=Qh7bwfQ_Dq8bEMuMLOzFOc_da_0n2GKr8tRFeFqTo5g,3168
270
269
  akshare/stock/stock_repurchase_em.py,sha256=XVAUD_yd48wqxbMbfU0Ne2SNFOSG9NBklUhf3pl6cKc,5000
271
- akshare/stock/stock_share_changes_cninfo.py,sha256=7I3YUVdlW2HHm77zGkx94WiSw89d2IUosMyXSERXdU0,4806
270
+ akshare/stock/stock_share_changes_cninfo.py,sha256=zg-1KHPbxdMRMr4wYY8LA30D-u47YesbEDt_MgCMk_k,4846
272
271
  akshare/stock/stock_share_hold.py,sha256=uToDxxnaD9nVtsidq0kVK-LzWU4XZdZBdzJnJvywAfI,10959
273
272
  akshare/stock/stock_stop.py,sha256=8HyazJAFj-s12ujUtrxO8VPXyA5bF9-3eNEj0qzGwMg,1185
274
273
  akshare/stock/stock_summary.py,sha256=g6BKqQRT3VAtirMaPJcIdA4itARq5NhTXKSIJaxA5KA,22524
@@ -381,8 +380,8 @@ akshare/utils/token_process.py,sha256=K4rGXjh_tgugbRcyOK2h2x0jP3PT65IIK7nxhUKhOe
381
380
  akshare/utils/tqdm.py,sha256=MuPNwcswkOGjwWQOMWXi9ZvQ_RmW4obCWRj2i7HM7FE,847
382
381
  tests/__init__.py,sha256=gNzhlO0UPjFq6Ieb38kaVIODXv4cTDByrdohAZnDYt4,82
383
382
  tests/test_func.py,sha256=tfvy_YnYmDra2dkKZ5JvprU1gNW5X9T634PszdSdH1A,944
384
- akshare-1.14.42.dist-info/LICENSE,sha256=mmSZCPgfHiVw34LXuFArd-SUgQtBJ_QsIlh-kWlDHfs,1073
385
- akshare-1.14.42.dist-info/METADATA,sha256=t5BRxbmrvVzSz8xKlvCWIf45KD3IaEuwv0YiT7cyE2I,13976
386
- akshare-1.14.42.dist-info/WHEEL,sha256=Wyh-_nZ0DJYolHNn1_hMa4lM7uDedD_RGVwbmTjyItk,91
387
- akshare-1.14.42.dist-info/top_level.txt,sha256=jsf9ZzZPmHaISTVumQPsAw7vv7Yv-PdEVW70SMEelQQ,14
388
- akshare-1.14.42.dist-info/RECORD,,
383
+ akshare-1.14.43.dist-info/LICENSE,sha256=mmSZCPgfHiVw34LXuFArd-SUgQtBJ_QsIlh-kWlDHfs,1073
384
+ akshare-1.14.43.dist-info/METADATA,sha256=RS22pTu3JedVL7DolFScGLcJgY4MHm2p-b4MDxcvlpE,13976
385
+ akshare-1.14.43.dist-info/WHEEL,sha256=Wyh-_nZ0DJYolHNn1_hMa4lM7uDedD_RGVwbmTjyItk,91
386
+ akshare-1.14.43.dist-info/top_level.txt,sha256=jsf9ZzZPmHaISTVumQPsAw7vv7Yv-PdEVW70SMEelQQ,14
387
+ akshare-1.14.43.dist-info/RECORD,,
@@ -1,123 +0,0 @@
1
- #!/usr/bin/env python
2
- # -*- coding:utf-8 -*-
3
- """
4
- Date: 2021/6/30 15:55
5
- Desc: 获取 IT桔子 的死亡公司数据、千里马和独角兽
6
- https://www.itjuzi.com/deathCompany
7
- https://www.itjuzi.com/chollima
8
- https://www.itjuzi.com/unicorn
9
- """
10
- import pandas as pd
11
-
12
-
13
- def death_company() -> pd.DataFrame:
14
- """
15
- 此数据未更新
16
- IT桔子-死亡公司名单
17
- https://www.itjuzi.com/deathCompany
18
- :return: 死亡公司名单
19
- :rtype: pandas.DataFrame
20
- """
21
- temp_df = pd.read_csv(
22
- "https://jfds-1252952517.cos.ap-chengdu.myqcloud.com/akshare/data/data_juzi/juzi.csv"
23
- )
24
-
25
- temp_df.reset_index(inplace=True, drop=True)
26
- temp_df.columns = [
27
- "公司简称",
28
- "成立时间",
29
- "关闭时间",
30
- "存活天数",
31
- "融资规模",
32
- "行业",
33
- "地点",
34
- ]
35
- return temp_df
36
-
37
-
38
- def nicorn_company() -> pd.DataFrame:
39
- """
40
- 此数据未更新
41
- IT桔子-独角兽公司
42
- https://www.itjuzi.com/unicorn
43
- :return: 独角兽公司
44
- :rtype: pandas.DataFrame
45
- """
46
- temp_df = pd.read_csv(
47
- "https://jfds-1252952517.cos.ap-chengdu.myqcloud.com/akshare/data/data_juzi/nicorn_company.csv",
48
- index_col=0,
49
- )
50
- temp_df.reset_index(drop=True, inplace=True)
51
- del temp_df["com_id"]
52
- del temp_df["com_logo_archive"]
53
- del temp_df["com_city"]
54
- del temp_df["invse_year"]
55
- del temp_df["invse_month"]
56
- del temp_df["invse_day"]
57
- del temp_df["invse_guess_particulars"]
58
- del temp_df["invse_detail_money"]
59
- del temp_df["invse_currency_id"]
60
- del temp_df["invse_similar_money_id"]
61
- del temp_df["invse_round_id"]
62
- del temp_df["money"]
63
- del temp_df["invse_money"]
64
- del temp_df["round"]
65
- temp_df.reset_index(inplace=True)
66
- temp_df["index"] = range(1, len(temp_df) + 1)
67
- temp_df.columns = [
68
- "序号",
69
- "公司",
70
- "地区",
71
- "行业",
72
- "子行业",
73
- ]
74
- return temp_df
75
-
76
-
77
- def maxima_company() -> pd.DataFrame:
78
- """
79
- 此数据未更新
80
- IT桔子-千里马公司
81
- https://www.itjuzi.com/chollima
82
- :return: 千里马公司
83
- :rtype: pandas.DataFrame
84
- """
85
- temp_df = pd.read_csv(
86
- "https://jfds-1252952517.cos.ap-chengdu.myqcloud.com/akshare/data/data_juzi/maxima.csv",
87
- index_col=0,
88
- )
89
- temp_df.reset_index(drop=True, inplace=True)
90
- del temp_df["com_id"]
91
- del temp_df["com_logo_archive"]
92
- del temp_df["com_scope_id"]
93
- del temp_df["invse_year"]
94
- del temp_df["invse_month"]
95
- del temp_df["invse_day"]
96
- del temp_df["invse_similar_money_id"]
97
- del temp_df["invse_guess_particulars"]
98
- del temp_df["invse_detail_money"]
99
- del temp_df["invse_currency_id"]
100
- del temp_df["invse_round_id"]
101
- del temp_df["money"]
102
- del temp_df["invse_money"]
103
- del temp_df["round"]
104
- temp_df.reset_index(inplace=True)
105
- temp_df["index"] = range(1, len(temp_df) + 1)
106
- temp_df.columns = [
107
- "序号",
108
- "公司",
109
- "行业",
110
- "地区",
111
- ]
112
- return temp_df
113
-
114
-
115
- if __name__ == "__main__":
116
- death_company_df = death_company()
117
- print(death_company_df)
118
-
119
- nicorn_company_df = nicorn_company()
120
- print(nicorn_company_df)
121
-
122
- maxima_company_df = maxima_company()
123
- print(maxima_company_df)