akshare 1.16.38__py3-none-any.whl → 1.16.39__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
@@ -3047,9 +3047,10 @@ amac_manager_cancelled_info # 中国证券投资基金业协会-信息公示-诚
3047
3047
  1.16.36 fix: fix stock_intraday_em interface
3048
3048
  1.16.37 fix: fix stock_board_concept_hist_em interface
3049
3049
  1.16.38 fix: fix fund_etf_hist_em interface
3050
+ 1.16.39 fix: fix option_current_em interface
3050
3051
  """
3051
3052
 
3052
- __version__ = "1.16.38"
3053
+ __version__ = "1.16.39"
3053
3054
  __author__ = "AKFamily"
3054
3055
 
3055
3056
  import sys
@@ -8,6 +8,7 @@ https://quote.eastmoney.com/center/qqsc.html
8
8
 
9
9
  import pandas as pd
10
10
  import requests
11
+ from akshare.utils.func import fetch_paginated_data
11
12
 
12
13
 
13
14
  def option_current_em() -> pd.DataFrame:
@@ -20,9 +21,9 @@ def option_current_em() -> pd.DataFrame:
20
21
  url = "https://23.push2.eastmoney.com/api/qt/clist/get"
21
22
  params = {
22
23
  "pn": "1",
23
- "pz": "50000",
24
+ "pz": "100",
24
25
  "po": "1",
25
- "np": "2",
26
+ "np": "1",
26
27
  "ut": "bd1d9ddb04089700cf9c27f6f7426281",
27
28
  "fltt": "2",
28
29
  "invt": "2",
@@ -32,11 +33,7 @@ def option_current_em() -> pd.DataFrame:
32
33
  "f23,f24,f25,f22,f28,f11,f62,f128,f136,f115,f152,f133,f108,f163,f161,f162",
33
34
  "_": "1606225274063",
34
35
  }
35
- r = requests.get(url, params=params)
36
- data_json = r.json()
37
- temp_df = pd.DataFrame(data_json["data"]["diff"]).T
38
- temp_df.reset_index(inplace=True)
39
- temp_df["index"] = temp_df["index"].astype(int) + 1
36
+ temp_df = fetch_paginated_data(url=url, base_params=params)
40
37
  temp_df.columns = [
41
38
  "序号",
42
39
  "_",
@@ -12,6 +12,7 @@ import requests
12
12
  from bs4 import BeautifulSoup
13
13
 
14
14
  from akshare.utils.tqdm import get_tqdm
15
+ from akshare.utils.func import fetch_paginated_data
15
16
 
16
17
 
17
18
  def stock_hsgt_fund_flow_summary_em() -> pd.DataFrame:
@@ -101,22 +102,18 @@ def stock_hk_ggt_components_em() -> pd.DataFrame:
101
102
  url = "https://33.push2.eastmoney.com/api/qt/clist/get"
102
103
  params = {
103
104
  "pn": "1",
104
- "pz": "5000",
105
+ "pz": "100",
105
106
  "po": "1",
106
- "np": "2",
107
+ "np": "1",
107
108
  "ut": "bd1d9ddb04089700cf9c27f6f7426281",
108
109
  "fltt": "2",
109
- "fid": "f3",
110
+ "fid": "f12",
110
111
  "fs": "b:DLMK0146,b:DLMK0144",
111
112
  "fields": "f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f12,f13,f14,f15,f16,f17,f18,f19,f20,f21,f23,f24,"
112
113
  "f25,f26,f22,f33,f11,f62,f128,f136,f115,f152",
113
114
  "_": "1639974456250",
114
115
  }
115
- r = requests.get(url, params=params)
116
- data_json = r.json()
117
- temp_df = pd.DataFrame(data_json["data"]["diff"]).T
118
- temp_df.reset_index(inplace=True)
119
- temp_df["index"] = temp_df.index + 1
116
+ temp_df = fetch_paginated_data(url=url, base_params=params)
120
117
  temp_df.columns = [
121
118
  "序号",
122
119
  "-",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: akshare
3
- Version: 1.16.38
3
+ Version: 1.16.39
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=LlnGpK7R_pXHnHCgH6qGGRhP0yb5sf9dkzddZbdMvNo,190486
1
+ akshare/__init__.py,sha256=N4xHW6fGYJxHg15VX8SkEEUgl6R3vE1PSDblUTwmDOk,190531
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
@@ -199,7 +199,7 @@ akshare/option/option_commodity.py,sha256=KQ690k83wKnjYN5Sf3meLx0pvEYAc5dE2tOkv3
199
199
  akshare/option/option_commodity_sina.py,sha256=r6qK_K7w3A6Uqp5ZtBb4pW7vH04oMyeCEZLLGqi0jpA,7776
200
200
  akshare/option/option_czce.py,sha256=L4i7TVKcOns5ZKoqq-mrSykdx3SGwu6OL4eI77-A_lc,1812
201
201
  akshare/option/option_daily_stats_sse_szse.py,sha256=Ip_vE81qbEGt4ocbtWfUT7XGu0HWU0zKkzauZeq9RJA,4962
202
- akshare/option/option_em.py,sha256=M5mWE-YRQOywC9MY4CNgNwjLNl2AF32P4CHSF6zvK4k,5962
202
+ akshare/option/option_em.py,sha256=SV_pBGDE4rer1wZ3wsBsfjtOIIudBAHPuk6_5kPAPBc,5860
203
203
  akshare/option/option_finance.py,sha256=7rnEeHo-7Sddrs36Q4c99CXL_9m8IJzw9S1Aqh3Bw90,12568
204
204
  akshare/option/option_finance_sina.py,sha256=Pzsrl_NKN99nWPSAirq7ushGwSfd738ISVYeCHxMZXE,37843
205
205
  akshare/option/option_lhb_em.py,sha256=VHrV2BWAPE7tj8q7J5Crjm-sey8QarYd1lgxKbkX2CQ,9090
@@ -322,7 +322,7 @@ akshare/stock_feature/stock_hist_em.py,sha256=vC3gWA1hTgWdwk4VFfk6HOwfWuzlYO2xa5
322
322
  akshare/stock_feature/stock_hist_tx.py,sha256=WpLsbkG2didSx7lYNkSbTWNTrLhUKbcopfD18WO2Rlc,3397
323
323
  akshare/stock_feature/stock_hk_valuation_baidu.py,sha256=_sErx4UhNsSXJgXyPfrL0aPxkW53Mg1zH9gEKoziaCA,1968
324
324
  akshare/stock_feature/stock_hot_xq.py,sha256=NmoH4x-0hiDztj-YwzMFVIyOICQ2wUUBbhjt91q-tq4,9112
325
- akshare/stock_feature/stock_hsgt_em.py,sha256=zYs5dWw0dTn0ZIwnR6uzlmC5CzFiwIavPNiceH7BOFU,57783
325
+ akshare/stock_feature/stock_hsgt_em.py,sha256=-BN09F02MXMjP-8lmXUpaYuueVYuZooYxKh6Cd6GIqY,57698
326
326
  akshare/stock_feature/stock_hsgt_exchange_rate.py,sha256=-oJZ83FUQrNJX_4GB5hS562IdrfJbCwr0d5ioYXtPrQ,7212
327
327
  akshare/stock_feature/stock_hsgt_min_em.py,sha256=KLeez7MQwBAcO-RT7n41LOikUfvXDGK0-G1n9av5mtY,2883
328
328
  akshare/stock_feature/stock_info.py,sha256=JSmJWrSzzq4sP4CgOU0mYGVcbXeWlRDQxNYtbSjJmiM,9043
@@ -388,8 +388,8 @@ akshare/utils/token_process.py,sha256=K4rGXjh_tgugbRcyOK2h2x0jP3PT65IIK7nxhUKhOe
388
388
  akshare/utils/tqdm.py,sha256=MuPNwcswkOGjwWQOMWXi9ZvQ_RmW4obCWRj2i7HM7FE,847
389
389
  tests/__init__.py,sha256=gNzhlO0UPjFq6Ieb38kaVIODXv4cTDByrdohAZnDYt4,82
390
390
  tests/test_func.py,sha256=j1MGYbZI2if2j_LY1S4FLsf4qfq4NwVqD5wmRlv5Log,832
391
- akshare-1.16.38.dist-info/LICENSE,sha256=mmSZCPgfHiVw34LXuFArd-SUgQtBJ_QsIlh-kWlDHfs,1073
392
- akshare-1.16.38.dist-info/METADATA,sha256=RbGznnO0xmuJLWI8OKqnZcwK0JRBoXd68WigQZzKJQk,13653
393
- akshare-1.16.38.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
394
- akshare-1.16.38.dist-info/top_level.txt,sha256=jsf9ZzZPmHaISTVumQPsAw7vv7Yv-PdEVW70SMEelQQ,14
395
- akshare-1.16.38.dist-info/RECORD,,
391
+ akshare-1.16.39.dist-info/LICENSE,sha256=mmSZCPgfHiVw34LXuFArd-SUgQtBJ_QsIlh-kWlDHfs,1073
392
+ akshare-1.16.39.dist-info/METADATA,sha256=tHG2gpJ4nT8AAmz7PKYOODVWbEdgLQppyAjBCZXtk4E,13653
393
+ akshare-1.16.39.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
394
+ akshare-1.16.39.dist-info/top_level.txt,sha256=jsf9ZzZPmHaISTVumQPsAw7vv7Yv-PdEVW70SMEelQQ,14
395
+ akshare-1.16.39.dist-info/RECORD,,