Skip to content

Commit

Permalink
fix(stock_lh_yybpm.py): fix stock_lh_yyb_capital interface
Browse files Browse the repository at this point in the history
fix stock_lh_yyb_capital interface
  • Loading branch information
albertandking committed May 2, 2023
1 parent 0d341cf commit ac84f43
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
3 changes: 2 additions & 1 deletion akshare/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2383,9 +2383,10 @@
1.9.65 fix: fix stock_hot_search_baidu interface
1.9.66 fix: fix match_main_contract interface
1.9.67 fix: fix futures_zh_daily_sina interface
1.9.68 fix: fix stock_lh_yyb_capital interface
"""

__version__ = "1.9.67"
__version__ = "1.9.68"
__author__ = "AKFamily"

import sys
Expand Down
10 changes: 5 additions & 5 deletions akshare/stock_feature/stock_lh_yybpm.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python
# -*- coding:utf-8 -*-
"""
Date: 2021/4/19 16:56
Date: 2023/5/2 20:30
Desc: 同花顺-数据中心-营业部排名
http://data.10jqka.com.cn/market/longhu/
"""
Expand All @@ -25,7 +25,7 @@ def stock_lh_yyb_most() -> pd.DataFrame:
url = f'http://data.10jqka.com.cn/ifmarket/lhbyyb/type/1/tab/sbcs/field/sbcs/sort/desc/page/{page}/'
r = requests.get(url, headers=headers)
temp_df = pd.read_html(r.text)[0]
big_df = big_df.append(temp_df)
big_df = pd.concat([big_df, temp_df], ignore_index=True)
big_df.reset_index(inplace=True, drop=True)
return big_df

Expand All @@ -45,7 +45,7 @@ def stock_lh_yyb_capital() -> pd.DataFrame:
url = f'http://data.10jqka.com.cn/ifmarket/lhbyyb/type/1/tab/zjsl/field/zgczje/sort/desc/page/{page}/'
r = requests.get(url, headers=headers)
temp_df = pd.read_html(r.text)[0]
big_df = big_df.append(temp_df)
big_df = pd.concat([big_df, temp_df], ignore_index=True)
big_df.reset_index(inplace=True, drop=True)
return big_df

Expand All @@ -58,14 +58,14 @@ def stock_lh_yyb_control() -> pd.DataFrame:
:rtype: pandas.DataFrame
"""
big_df = pd.DataFrame()
for page in tqdm(range(1, 11)):
for page in tqdm(range(1, 16)):
headers = {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36'
}
url = f'http://data.10jqka.com.cn/ifmarket/lhbyyb/type/1/tab/btcz/field/xsjs/sort/desc/page/{page}/'
r = requests.get(url, headers=headers)
temp_df = pd.read_html(r.text)[0]
big_df = big_df.append(temp_df)
big_df = pd.concat([big_df, temp_df], ignore_index=True)
big_df.reset_index(inplace=True, drop=True)
return big_df

Expand Down
6 changes: 6 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@

## 更新说明

1.9.68 fix: fix stock_lh_yyb_capital interface

1. 修复 stock_lh_yyb_capital 接口

1.9.67 fix: fix futures_zh_daily_sina interface

1. 修复 futures_zh_daily_sina 接口
Expand Down Expand Up @@ -2247,6 +2251,8 @@

## 版本更新说明

1.9.68 fix: fix stock_lh_yyb_capital interface

1.9.67 fix: fix futures_zh_daily_sina interface

1.9.66 fix: fix match_main_contract interface
Expand Down

0 comments on commit ac84f43

Please sign in to comment.