akshare 1.17.40__py3-none-any.whl → 1.17.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
@@ -3147,9 +3147,11 @@ amac_manager_cancelled_info # 中国证券投资基金业协会-信息公示-诚
3147
3147
  1.17.38 fix: fix futures_inventory_99 interface
3148
3148
  1.17.39 fix: fix bond_zh_cov_value_analysis interface
3149
3149
  1.17.40 fix: fix stock_gdfx_free_holding_change_em interface
3150
+ 1.17.41 fix: fix stock_info_global_ths interface
3151
+ 1.17.42 fix: fix reits_realtime_em interface
3150
3152
  """
3151
3153
 
3152
- __version__ = "1.17.40"
3154
+ __version__ = "1.17.42"
3153
3155
  __author__ = "AKFamily"
3154
3156
 
3155
3157
  import sys
@@ -3356,7 +3358,6 @@ from akshare.stock_feature.stock_info import (
3356
3358
  stock_info_global_futu,
3357
3359
  stock_info_global_sina,
3358
3360
  stock_info_global_cls,
3359
- stock_info_broker_sina,
3360
3361
  )
3361
3362
 
3362
3363
  """
@@ -1,17 +1,18 @@
1
1
  #!/usr/bin/env python
2
2
  # -*- coding:utf-8 -*-
3
3
  """
4
- Date: 2025/3/27 15:00
4
+ Date: 2025/8/26 15:00
5
5
  Desc: REITs 行情及信息
6
6
  https://quote.eastmoney.com/center/gridlist.html#fund_reits_all
7
7
  https://www.jisilu.cn/data/cnreits/#CnReits
8
8
  """
9
9
 
10
- import pandas as pd
11
- import requests
12
10
  from functools import lru_cache
13
11
  from typing import Dict
14
12
 
13
+ import pandas as pd
14
+ import requests
15
+
15
16
 
16
17
  @lru_cache()
17
18
  def __reits_code_market_map() -> Dict:
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env python
2
2
  # -*- coding:utf-8 -*-
3
3
  """
4
- Date: 2025/2/25 17:00
4
+ Date: 2025/8/25 15:00
5
5
  Desc: 东方财富-财经早餐
6
6
  https://stock.eastmoney.com/a/czpnc.html
7
7
  """
@@ -10,7 +10,6 @@ from datetime import datetime
10
10
 
11
11
  import pandas as pd
12
12
  import requests
13
- from bs4 import BeautifulSoup
14
13
 
15
14
  from akshare.request import make_request_with_retry_json
16
15
  from akshare.utils.cons import headers
@@ -135,11 +134,10 @@ def stock_info_global_futu() -> pd.DataFrame:
135
134
  }
136
135
  headers = {
137
136
  "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko)"
138
- " Chrome/111.0.0.0 Safari/537.36"
137
+ " Chrome/111.0.0.0 Safari/537.36"
139
138
  }
140
139
  r = requests.get(url, params=params, headers=headers)
141
140
  data_json = r.json()
142
-
143
141
  temp_df = pd.DataFrame(data_json["data"]["data"]["news"])
144
142
  temp_df = temp_df[["title", "content", "time", "detailUrl"]]
145
143
  temp_df["time"] = [
@@ -223,46 +221,6 @@ def stock_info_global_cls(symbol: str = "全部") -> pd.DataFrame:
223
221
  return big_df
224
222
 
225
223
 
226
- def stock_info_broker_sina(page: str = "1") -> pd.DataFrame:
227
- """
228
- 新浪财经-证券-证券原创
229
- https://finance.sina.com.cn/roll/index.d.html?cid=221431
230
- :param page: 页面号
231
- :type page: str
232
- :return: 证券原创文章
233
- :rtype: pandas.DataFrame
234
- """
235
- url = "https://finance.sina.com.cn/roll/index.d.html?cid=221431"
236
- params = {"page": page}
237
- r = requests.get(url, params=params)
238
- r.encoding = "utf-8"
239
- data_text = r.text
240
- soup = BeautifulSoup(data_text, features="lxml")
241
- data = []
242
- current_year = datetime.now().year
243
- for ul_index in range(0, 11):
244
- for li_index in range(0, 6):
245
- a_selector = f"#Main > div:nth-of-type(3) > ul:nth-of-type({ul_index}) > li:nth-of-type({li_index}) > a"
246
- span_selector = f"#Main > div:nth-of-type(3) > ul:nth-of-type({ul_index}) > li:nth-of-type({li_index}) > span"
247
- # 获取<a>标签和<span>标签内的文本内容
248
- a_element = soup.select_one(a_selector)
249
- span_element = soup.select_one(span_selector)
250
- if a_element and span_element:
251
- href = a_element.get("href")
252
- target = a_element.get("target")
253
- date = str(current_year) + "年" + span_element.text[1:-1]
254
- text = a_element.text
255
- data.append(
256
- {"href": href, "target": target, "date": date, "text": text}
257
- )
258
-
259
- temp_df = pd.DataFrame(data)
260
- temp_df = temp_df[["date", "text", "href"]]
261
- temp_df.columns = ["时间", "内容", "链接"]
262
- temp_df.sort_values(["时间"], ignore_index=True, inplace=True)
263
- return temp_df
264
-
265
-
266
224
  if __name__ == "__main__":
267
225
  stock_info_cjzc_em_df = stock_info_cjzc_em()
268
226
  print(stock_info_cjzc_em_df)
@@ -281,6 +239,3 @@ if __name__ == "__main__":
281
239
 
282
240
  stock_info_global_cls_df = stock_info_global_cls(symbol="全部")
283
241
  print(stock_info_global_cls_df)
284
-
285
- stock_info_broker_sina_df = stock_info_broker_sina(page="1")
286
- print(stock_info_broker_sina_df)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: akshare
3
- Version: 1.17.40
3
+ Version: 1.17.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=8__3PYQYyPWzKAHFvt0sRSyz1s0YgNIaR2XDxPYYB6A,196502
1
+ akshare/__init__.py,sha256=KAJ-BaJuKZ52Qlj5WnIlolTa8Dt1lf9R4x9wZU22bWM,196568
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
@@ -228,7 +228,7 @@ akshare/qhkc_web/qhkc_tool.py,sha256=wLy5Vi_eqwjsiNfw8qSCQwOH12XdUcGKdXygRyznt0c
228
228
  akshare/rate/__init__.py,sha256=qbRx0IhTYi5ZakakyP1xD7dwHmqqkuAvBh0Z1kQr3MQ,82
229
229
  akshare/rate/repo_rate.py,sha256=lxSEMOeWsf-cVfJfZ7XBfSqOwYYQSJKp3iamCWubfjg,4295
230
230
  akshare/reits/__init__.py,sha256=icmIWDUbQg5O-0SJCvf44FzvypneQrb3D-s540_kFk8,81
231
- akshare/reits/reits_basic.py,sha256=HrVz8z9EUBkKuHDvsZlL2gjR9Ff3Ea082RnVi-DY7aY,7326
231
+ akshare/reits/reits_basic.py,sha256=CRE-_paiPwQ8vWqvJfs8ZAN_LqiMGYkawV4u96aUfGI,7327
232
232
  akshare/spot/__init__.py,sha256=BvXm1zCReGMWbcANKydbK9uvYzNU-cbReuUYbdDqunI,82
233
233
  akshare/spot/spot_hog_soozhu.py,sha256=IEt7zrDs0ptAKgMA7QRIk45jcMLcA_LGq6Y3lKLFTi0,9397
234
234
  akshare/spot/spot_price_qh.py,sha256=rRv09vR8K0U_x6x8AiLgGluxytIXkLatFNVkFbIh8eQ,3756
@@ -331,7 +331,7 @@ akshare/stock_feature/stock_hot_xq.py,sha256=P4-fLjrh-9CdVe5BQ2O5hmeSesHQAu9E49a
331
331
  akshare/stock_feature/stock_hsgt_em.py,sha256=6X4izxAbApHIO1YK2nYaZCE1hdn18tTbGjJta4Q-7a0,62222
332
332
  akshare/stock_feature/stock_hsgt_exchange_rate.py,sha256=dSNtqVUyySIqfBu9U5TiDZOETwb2fcO6Y16vLc67c0w,7152
333
333
  akshare/stock_feature/stock_hsgt_min_em.py,sha256=DBNrZwbbR_XoGvGHvi-vexWsBq1Ddio8qe0L9ck0iqY,2841
334
- akshare/stock_feature/stock_info.py,sha256=JSmJWrSzzq4sP4CgOU0mYGVcbXeWlRDQxNYtbSjJmiM,9043
334
+ akshare/stock_feature/stock_info.py,sha256=4o2TIALJoL4BSH5Q861y5OnGBuz6y7b9f6uImtnGXc4,7261
335
335
  akshare/stock_feature/stock_inner_trade_xq.py,sha256=XNeQheeWcjdhuvfO2NWt_m191HX88HS452nZdXFBm9w,2652
336
336
  akshare/stock_feature/stock_irm_cninfo.py,sha256=xD028gllzaHYj6xU9pRKvSLI_gIkVhCTnFH0dSPv1gY,6112
337
337
  akshare/stock_feature/stock_jgdy_em.py,sha256=B39Il7p1a_hx0FXL4zo_Xsxi10Z8W7_EZv8f9nNnwXg,6080
@@ -393,10 +393,10 @@ akshare/utils/func.py,sha256=4cwmXFztU86yJNONJ40KJLvsIEQHBbct4iMm3zT2v30,2315
393
393
  akshare/utils/multi_decrypt.py,sha256=aWoL2iEPeuXHJg8-n7OtMKixLnIhfzepACgxfrfmQB4,1657
394
394
  akshare/utils/token_process.py,sha256=nGtgnZGRprXJkhLXH8mcUH4TgIFwzsTOb0EaEPa0Euo,667
395
395
  akshare/utils/tqdm.py,sha256=MuPNwcswkOGjwWQOMWXi9ZvQ_RmW4obCWRj2i7HM7FE,847
396
- akshare-1.17.40.dist-info/licenses/LICENSE,sha256=s18q7gS2g1F9-Cnk5eqrJG4OGWSwSxVEMzIuT6HyYNY,1073
396
+ akshare-1.17.42.dist-info/licenses/LICENSE,sha256=s18q7gS2g1F9-Cnk5eqrJG4OGWSwSxVEMzIuT6HyYNY,1073
397
397
  tests/__init__.py,sha256=gNzhlO0UPjFq6Ieb38kaVIODXv4cTDByrdohAZnDYt4,82
398
398
  tests/test_func.py,sha256=j1MGYbZI2if2j_LY1S4FLsf4qfq4NwVqD5wmRlv5Log,832
399
- akshare-1.17.40.dist-info/METADATA,sha256=WoeP1pL0kOESdNpoI3I1unhPgXWmGVSTKu5vw_Vc_Kk,12608
400
- akshare-1.17.40.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
401
- akshare-1.17.40.dist-info/top_level.txt,sha256=jsf9ZzZPmHaISTVumQPsAw7vv7Yv-PdEVW70SMEelQQ,14
402
- akshare-1.17.40.dist-info/RECORD,,
399
+ akshare-1.17.42.dist-info/METADATA,sha256=qX_7DfmtOGAIJB9NrNSSlmAl-70r08eCIynhrOouk34,12608
400
+ akshare-1.17.42.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
401
+ akshare-1.17.42.dist-info/top_level.txt,sha256=jsf9ZzZPmHaISTVumQPsAw7vv7Yv-PdEVW70SMEelQQ,14
402
+ akshare-1.17.42.dist-info/RECORD,,