Skip to content

Commit 4280dd4

Browse files
authored
Merge pull request #224 from lonelam/fix/cnindex
fix: update domain for index data updates
2 parents 63195d4 + 3f90065 commit 4280dd4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/zvt/recorders/exchange/api/cn_index_api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
logger = logging.getLogger(__name__)
1313

1414
original_page_url = "http://www.cnindex.com.cn/zh_indices/sese/index.html?act_menu=1&index_type=-1"
15-
url = "http://www.cnindex.net.cn/index/indexList?channelCode={}&rows=1000&pageNum=1"
15+
url = "http://www.cnindex.com.cn/index/indexList?channelCode={}&rows=1000&pageNum=1"
1616

1717
# 中证指数 抓取 风格指数 行业指数 规模指数 基金指数
1818
cni_category_map_url = {
@@ -80,7 +80,7 @@ def get_cn_index(index_type="cni", category=IndexCategory.style):
8080
for i, result in enumerate(results):
8181
logger.info(f"to {i}/{len(results)}")
8282
code = result["indexcode"]
83-
info_resp = requests_session.get(f"http://www.cnindex.net.cn/index-intro?indexcode={code}")
83+
info_resp = requests_session.get(f"http://www.cnindex.com.cn/index-intro?indexcode={code}")
8484
# fbrq: "2010-01-04"
8585
# jd: 1000
8686
# jr: "2002-12-31"

src/zvt/recorders/exchange/api/cn_index_stock_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
logger = logging.getLogger(__name__)
1212

1313
original_page_url = "http://www.cnindex.com.cn/module/index-detail.html?act_menu=1&indexCode=399001"
14-
url = "http://www.cnindex.net.cn/sample-detail/detail?indexcode={}&dateStr={}&pageNum=1&rows=5000"
14+
url = "http://www.cnindex.com.cn/sample-detail/detail?indexcode={}&dateStr={}&pageNum=1&rows=5000"
1515

1616

1717
def _get_resp_data(resp: requests.Response):

0 commit comments

Comments
 (0)