akshare 1.15.30__py3-none-any.whl → 1.15.32__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
@@ -2940,9 +2940,11 @@ amac_manager_cancelled_info # 中国证券投资基金业协会-信息公示-诚
2940
2940
  1.15.28 fix: fix stock_hk_valuation_baidu interface
2941
2941
  1.15.29 fix: fix option_dce_daily interface
2942
2942
  1.15.30 fix: fix fund_etf_category_sina interface
2943
+ 1.15.31 fix: fix stock_zt_pool_strong_em interface
2944
+ 1.15.32 fix: fix stock_info_global_cls interface
2943
2945
  """
2944
2946
 
2945
- __version__ = "1.15.30"
2947
+ __version__ = "1.15.32"
2946
2948
  __author__ = "AKFamily"
2947
2949
 
2948
2950
  import sys
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env python
2
2
  # -*- coding:utf-8 -*-
3
3
  """
4
- Date: 2024/3/13 15:00
4
+ Date: 2024/11/23 17:00
5
5
  Desc: 东方财富-财经早餐
6
6
  https://stock.eastmoney.com/a/czpnc.html
7
7
  """
@@ -12,6 +12,8 @@ import pandas as pd
12
12
  import requests
13
13
  from bs4 import BeautifulSoup
14
14
 
15
+ from akshare.request import make_request_with_retry_json
16
+
15
17
 
16
18
  def stock_info_cjzc_em() -> pd.DataFrame:
17
19
  """
@@ -201,34 +203,10 @@ def stock_info_global_cls(symbol: str = "全部") -> pd.DataFrame:
201
203
  :return: 财联社-电报
202
204
  :rtype: pandas.DataFrame
203
205
  """
204
- session = requests.session()
205
- url = "https://m.cls.cn/telegraph"
206
- session.get(url) # 获取 cookies
207
- params = {
208
- "refresh_type": "1",
209
- "rn": "10",
210
- "last_time": "",
211
- "app": "CailianpressWap",
212
- "sv": "1",
213
- }
214
- ts = pd.Timestamp(pd.Timestamp.now())
215
- current_time = int(ts.timestamp())
216
- params.update({"last_time": current_time})
217
- url = "https://m.cls.cn/nodeapi/telegraphs"
218
- r = session.get(url, params=params)
219
- data_json = r.json()
206
+ url = "https://www.cls.cn/nodeapi/telegraphList"
207
+ data_json = make_request_with_retry_json(url, max_retries=10)
220
208
  temp_df = pd.DataFrame(data_json["data"]["roll_data"])
221
- next_time = temp_df["ctime"].values[-1]
222
- n = 1
223
209
  big_df = temp_df.copy()
224
- while n < 15:
225
- params.update({"last_time": next_time})
226
- r = session.get(url, params=params)
227
- data_json = r.json()
228
- temp_df = pd.DataFrame(data_json["data"]["roll_data"])
229
- big_df = pd.concat(objs=[big_df, temp_df], ignore_index=True)
230
- next_time = temp_df["modified_time"].values[-1]
231
- n += 1
232
210
  big_df = big_df[["title", "content", "ctime", "level"]]
233
211
  big_df["ctime"] = pd.to_datetime(big_df["ctime"], unit="s", utc=True).dt.tz_convert(
234
212
  "Asia/Shanghai"
@@ -238,7 +216,6 @@ def stock_info_global_cls(symbol: str = "全部") -> pd.DataFrame:
238
216
  big_df.reset_index(inplace=True, drop=True)
239
217
  big_df["发布日期"] = big_df["发布时间"].dt.date
240
218
  big_df["发布时间"] = big_df["发布时间"].dt.time
241
-
242
219
  if symbol == "重点":
243
220
  big_df = big_df[(big_df["等级"] == "B") | (big_df["等级"] == "A")]
244
221
  big_df.reset_index(inplace=True, drop=True)
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env python
2
2
  # -*- coding:utf-8 -*-
3
3
  """
4
- Date: 2024/8/18 17:30
4
+ Date: 2024/11/22 21:30
5
5
  Desc: 首页-行情中心-涨停板行情-涨停股池
6
6
  https://quote.eastmoney.com/ztb/detail#type=ztgc
7
7
 
@@ -122,7 +122,7 @@ def stock_zt_pool_previous_em(date: str = "20240415") -> pd.DataFrame:
122
122
  "ut": "7eea3edcaed734bea9cbfc24409ed989",
123
123
  "dpt": "wz.ztzt",
124
124
  "Pageindex": "0",
125
- "pagesize": "170",
125
+ "pagesize": "5000",
126
126
  "sort": "zs:desc",
127
127
  "date": date,
128
128
  "_": "1621590489736",
@@ -200,7 +200,7 @@ def stock_zt_pool_strong_em(date: str = "20241009") -> pd.DataFrame:
200
200
  "ut": "7eea3edcaed734bea9cbfc24409ed989",
201
201
  "dpt": "wz.ztzt",
202
202
  "Pageindex": "0",
203
- "pagesize": "170",
203
+ "pagesize": "5000",
204
204
  "sort": "zdp:desc",
205
205
  "date": date,
206
206
  "_": "1621590489736",
@@ -278,7 +278,7 @@ def stock_zt_pool_sub_new_em(date: str = "20241011") -> pd.DataFrame:
278
278
  "ut": "7eea3edcaed734bea9cbfc24409ed989",
279
279
  "dpt": "wz.ztzt",
280
280
  "Pageindex": "0",
281
- "pagesize": "170",
281
+ "pagesize": "5000",
282
282
  "sort": "ods:asc",
283
283
  "date": date,
284
284
  "_": "1621590489736",
@@ -364,7 +364,7 @@ def stock_zt_pool_zbgc_em(date: str = "20241011") -> pd.DataFrame:
364
364
  "ut": "7eea3edcaed734bea9cbfc24409ed989",
365
365
  "dpt": "wz.ztzt",
366
366
  "Pageindex": "0",
367
- "pagesize": "170",
367
+ "pagesize": "5000",
368
368
  "sort": "fbt:asc",
369
369
  "date": date,
370
370
  "_": "1621590489736",
@@ -522,7 +522,7 @@ if __name__ == "__main__":
522
522
  stock_zt_pool_previous_em_df = stock_zt_pool_previous_em(date="20240415")
523
523
  print(stock_zt_pool_previous_em_df)
524
524
 
525
- stock_zt_pool_strong_em_df = stock_zt_pool_strong_em(date="20241009")
525
+ stock_zt_pool_strong_em_df = stock_zt_pool_strong_em(date="20241122")
526
526
  print(stock_zt_pool_strong_em_df)
527
527
 
528
528
  stock_zt_pool_sub_new_em_df = stock_zt_pool_sub_new_em(date="20241011")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: akshare
3
- Version: 1.15.30
3
+ Version: 1.15.32
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=p2G7VK9ddU9MzPrfL-MYZ-W5DMws0gNycqMUTmVBsIA,184182
1
+ akshare/__init__.py,sha256=TpzvlLxZV4_Y3a4nnLDpT41w39DpgoeeNlQAp3R53o8,184282
2
2
  akshare/datasets.py,sha256=-qdwaQjgBlftX84uM74KJqCYJYkQ50PV416_neA4uls,995
3
3
  akshare/exceptions.py,sha256=WEJjIhSmJ_xXNW6grwV4nufE_cfmmyuhmueVGiN1VAg,878
4
4
  akshare/request.py,sha256=HtFFf9MhfEibR-ETWe-1Tts6ELU4VKSqA-ghaXjegQM,4252
@@ -322,7 +322,7 @@ akshare/stock_feature/stock_hot_xq.py,sha256=NmoH4x-0hiDztj-YwzMFVIyOICQ2wUUBbhj
322
322
  akshare/stock_feature/stock_hsgt_em.py,sha256=1S18-GB9RvDP7tTvKR_W-BFSoKOPbpBTrbK67wbf-Uw,56688
323
323
  akshare/stock_feature/stock_hsgt_exchange_rate.py,sha256=YvhvdGx1nBJ_1swos1YNOtzy0GMFYo8MgNBh5QKphtE,6838
324
324
  akshare/stock_feature/stock_hsgt_min_em.py,sha256=KLeez7MQwBAcO-RT7n41LOikUfvXDGK0-G1n9av5mtY,2883
325
- akshare/stock_feature/stock_info.py,sha256=oLeWzDAEO0GCKGaNE-k1yUKn11qCkgENEmt-1nJq6-M,9912
325
+ akshare/stock_feature/stock_info.py,sha256=AQ4ZMXAks3qCxk3lbH_YpsqC-qQHpZ49UGk0Mm08d2E,9192
326
326
  akshare/stock_feature/stock_inner_trade_xq.py,sha256=jsARS5It6_UNn3WL8vnTK4F90Rx1dMvarxtiVbzOLrM,2682
327
327
  akshare/stock_feature/stock_irm_cninfo.py,sha256=xD028gllzaHYj6xU9pRKvSLI_gIkVhCTnFH0dSPv1gY,6112
328
328
  akshare/stock_feature/stock_jgdy_em.py,sha256=jmXRvmIwk7IY3SKAGaxi5M7WM7V8yY51UOPg94YQR9Q,6003
@@ -352,7 +352,7 @@ akshare/stock_feature/stock_zdhtmx_em.py,sha256=2BpJQntGgUlEIOmDlepOiOkw-e-tKLRa
352
352
  akshare/stock_feature/stock_zf_pg.py,sha256=nYJ1uLOBdzM_PDyq4MNeWoCTripFMAPoAiaPfhDqkcg,6343
353
353
  akshare/stock_feature/stock_zh_valuation_baidu.py,sha256=oxYIHP68pFvAYyqjCvZp3a9tpczTFiWhSxZ0w4eyo7I,1904
354
354
  akshare/stock_feature/stock_zh_vote_baidu.py,sha256=SsSNnCq7PDFMzWFcPFcC_MSc9rua412P14vHc923gmo,1761
355
- akshare/stock_feature/stock_ztb_em.py,sha256=DducYpjOOZmguhVlMbFX33EHVzoAMMjNvbef_oXuZPo,17019
355
+ akshare/stock_feature/stock_ztb_em.py,sha256=NwDP_ujq-vxeqo6hsactZo7oNdJULjJIv4UEy9fH7-8,17024
356
356
  akshare/stock_feature/ths.js,sha256=AWPkHf3L2Il1UUL0F5qDqNn1dfU0OlZBNUbMf8AmI3Y,39664
357
357
  akshare/stock_fundamental/__init__.py,sha256=jiXoO9OXiMxB0wHaPQkuxNckYuoFKtzuhZL1ytnE2nQ,82
358
358
  akshare/stock_fundamental/stock_finance.py,sha256=WuYvLo8xZxH-VS-6P-S31yzsKA1ojrwegcLXP2byle4,30676
@@ -383,8 +383,8 @@ akshare/utils/token_process.py,sha256=K4rGXjh_tgugbRcyOK2h2x0jP3PT65IIK7nxhUKhOe
383
383
  akshare/utils/tqdm.py,sha256=MuPNwcswkOGjwWQOMWXi9ZvQ_RmW4obCWRj2i7HM7FE,847
384
384
  tests/__init__.py,sha256=gNzhlO0UPjFq6Ieb38kaVIODXv4cTDByrdohAZnDYt4,82
385
385
  tests/test_func.py,sha256=j1MGYbZI2if2j_LY1S4FLsf4qfq4NwVqD5wmRlv5Log,832
386
- akshare-1.15.30.dist-info/LICENSE,sha256=mmSZCPgfHiVw34LXuFArd-SUgQtBJ_QsIlh-kWlDHfs,1073
387
- akshare-1.15.30.dist-info/METADATA,sha256=1Q8lpwTZGxFfygUDAfT-Q7iLr4O6n92n-6nQOdVXFOA,13423
388
- akshare-1.15.30.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
389
- akshare-1.15.30.dist-info/top_level.txt,sha256=jsf9ZzZPmHaISTVumQPsAw7vv7Yv-PdEVW70SMEelQQ,14
390
- akshare-1.15.30.dist-info/RECORD,,
386
+ akshare-1.15.32.dist-info/LICENSE,sha256=mmSZCPgfHiVw34LXuFArd-SUgQtBJ_QsIlh-kWlDHfs,1073
387
+ akshare-1.15.32.dist-info/METADATA,sha256=a3-G2gHG1TTi5mMSdjvzSOI_lsJVzeBralRK1N0Y_VU,13423
388
+ akshare-1.15.32.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
389
+ akshare-1.15.32.dist-info/top_level.txt,sha256=jsf9ZzZPmHaISTVumQPsAw7vv7Yv-PdEVW70SMEelQQ,14
390
+ akshare-1.15.32.dist-info/RECORD,,