akshare 1.14.41__py3-none-any.whl → 1.14.42__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 CHANGED
@@ -2852,9 +2852,10 @@ amac_manager_cancelled_info # 中国证券投资基金业协会-信息公示-诚
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
2854
  1.14.41 fix: fix fund_report_asset_allocation_cninfo interface
2855
+ 1.14.42 fix: fix stock_new_gh_cninfo interface
2855
2856
  """
2856
2857
 
2857
- __version__ = "1.14.41"
2858
+ __version__ = "1.14.42"
2858
2859
  __author__ = "AKFamily"
2859
2860
 
2860
2861
  import sys
@@ -1,14 +1,14 @@
1
1
  #!/usr/bin/env python
2
2
  # -*- coding:utf-8 -*-
3
3
  """
4
- Date: 2023/6/12 17:29
4
+ Date: 2024/7/25 14:30
5
5
  Desc: 巨潮资讯-数据中心-新股数据
6
- http://webapi.cninfo.com.cn/#/xinguList
6
+ https://webapi.cninfo.com.cn/#/xinguList
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,11 +30,11 @@ def _get_file_content_cninfo(file: str = "cninfo.js") -> str:
30
30
  def stock_new_gh_cninfo() -> pd.DataFrame:
31
31
  """
32
32
  巨潮资讯-数据中心-新股数据-新股过会
33
- http://webapi.cninfo.com.cn/#/xinguList
33
+ https://webapi.cninfo.com.cn/#/xinguList
34
34
  :return: 新股过会
35
35
  :rtype: pandas.DataFrame
36
36
  """
37
- url = "http://webapi.cninfo.com.cn/api/sysapi/p_sysapi1098"
37
+ url = "https://webapi.cninfo.com.cn/api/sysapi/p_sysapi1098"
38
38
  js_code = py_mini_racer.MiniRacer()
39
39
  js_content = _get_file_content_cninfo("cninfo.js")
40
40
  js_code.eval(js_content)
@@ -47,11 +47,12 @@ def stock_new_gh_cninfo() -> pd.DataFrame:
47
47
  "Cache-Control": "no-cache",
48
48
  "Content-Length": "0",
49
49
  "Host": "webapi.cninfo.com.cn",
50
- "Origin": "http://webapi.cninfo.com.cn",
50
+ "Origin": "https://webapi.cninfo.com.cn",
51
51
  "Pragma": "no-cache",
52
52
  "Proxy-Connection": "keep-alive",
53
- "Referer": "http://webapi.cninfo.com.cn/",
54
- "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.63 Safari/537.36",
53
+ "Referer": "https://webapi.cninfo.com.cn/",
54
+ "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) "
55
+ "Chrome/93.0.4577.63 Safari/537.36",
55
56
  "X-Requested-With": "XMLHttpRequest",
56
57
  }
57
58
  r = requests.post(url, headers=headers)
@@ -75,11 +76,11 @@ def stock_new_gh_cninfo() -> pd.DataFrame:
75
76
  def stock_new_ipo_cninfo() -> pd.DataFrame:
76
77
  """
77
78
  巨潮资讯-数据中心-新股数据-新股发行
78
- http://webapi.cninfo.com.cn/#/xinguList
79
+ https://webapi.cninfo.com.cn/#/xinguList
79
80
  :return: 新股发行
80
81
  :rtype: pandas.DataFrame
81
82
  """
82
- url = "http://webapi.cninfo.com.cn/api/sysapi/p_sysapi1097"
83
+ url = "https://webapi.cninfo.com.cn/api/sysapi/p_sysapi1097"
83
84
  js_code = py_mini_racer.MiniRacer()
84
85
  js_content = _get_file_content_cninfo("cninfo.js")
85
86
  js_code.eval(js_content)
@@ -92,11 +93,12 @@ def stock_new_ipo_cninfo() -> pd.DataFrame:
92
93
  "Cache-Control": "no-cache",
93
94
  "Content-Length": "0",
94
95
  "Host": "webapi.cninfo.com.cn",
95
- "Origin": "http://webapi.cninfo.com.cn",
96
+ "Origin": "https://webapi.cninfo.com.cn",
96
97
  "Pragma": "no-cache",
97
98
  "Proxy-Connection": "keep-alive",
98
- "Referer": "http://webapi.cninfo.com.cn/",
99
- "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.63 Safari/537.36",
99
+ "Referer": "https://webapi.cninfo.com.cn/",
100
+ "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) "
101
+ "Chrome/93.0.4577.63 Safari/537.36",
100
102
  "X-Requested-With": "XMLHttpRequest",
101
103
  }
102
104
  params = {
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: akshare
3
- Version: 1.14.41
3
+ Version: 1.14.42
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=quEKyO6OetuNOrR_wjNwgfHRQWDFi370GayaKLBgHUI,179944
1
+ akshare/__init__.py,sha256=Bu-6DN3lzU96wrdDyJbfIOFMtCWJGFGFGP4l3OEPl5k,179991
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
@@ -264,7 +264,7 @@ akshare/stock/stock_info_em.py,sha256=3um5PdmmXb4aR4N1TZrnqNj8a3FDwbMESlZ70KgWhP
264
264
  akshare/stock/stock_intraday_em.py,sha256=tqbxOAXkabcW57XQ29vSPY6B4xVnxg_Rw3aykkBhLrw,4512
265
265
  akshare/stock/stock_intraday_sina.py,sha256=HMuAAO2Teu4NUrOcBvyJdxYgWx-51qJCdtcqFmFNQg8,2359
266
266
  akshare/stock/stock_ipo_summary_cninfo.py,sha256=Ma-54GsOOhRWxilLH-Qmm0VVbpJQGf2XWKaJ8NBSgAY,3847
267
- akshare/stock/stock_new_cninfo.py,sha256=LmaTJ1qlBlMWn9PoI6h9sQNstAE4D5m-OqMPyCpFxPg,5676
267
+ akshare/stock/stock_new_cninfo.py,sha256=EOuZowDLQSSHyPAwXcuPXbQkqhbz2nRBZsM7o2ZWILE,5725
268
268
  akshare/stock/stock_profile_cninfo.py,sha256=tiEPnoH7IGp9DV1kMQNGIXuVOWpQFl_BS_RX_ijM4BI,3163
269
269
  akshare/stock/stock_rank_forecast.py,sha256=Qh7bwfQ_Dq8bEMuMLOzFOc_da_0n2GKr8tRFeFqTo5g,3168
270
270
  akshare/stock/stock_repurchase_em.py,sha256=XVAUD_yd48wqxbMbfU0Ne2SNFOSG9NBklUhf3pl6cKc,5000
@@ -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.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,,
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,,