From d6b6be5eb2ae00a8ccf46bd7d53cd7d0c1e59c72 Mon Sep 17 00:00:00 2001 From: Administrator <admin@example.com> Date: 星期五, 24 十一月 2023 19:19:37 +0800 Subject: [PATCH] 初始化独立某些方法 --- third_data/kpl_block_util.py | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/third_data/kpl_block_util.py b/third_data/kpl_block_util.py index 53bfc80..29fce8e 100644 --- a/third_data/kpl_block_util.py +++ b/third_data/kpl_block_util.py @@ -155,7 +155,7 @@ # 鑾峰彇褰撴棩瀹炴椂韬綅 # before_blocks_dict鏍煎紡浣峽"浠g爜":set("鏉垮潡")} def get_code_current_rank(code, block, current_limit_up_datas, code_limit_up_reason_dict, - yesterday_current_limit_up_codes, shsz=False): + yesterday_current_limit_up_codes, exclude_codes,open_limit_up_count, shsz=False): block_codes_infos = [] limit_up_time = time.time() for k in current_limit_up_datas: @@ -174,9 +174,14 @@ block_codes_infos.append((code, limit_up_time)) block_codes_infos.sort(key=lambda x: x[1]) front_codes = [] + first_count = 0 for i in range(0, len(block_codes_infos)): + if i == open_limit_up_count and exclude_codes and block_codes_infos[i][0] in exclude_codes: + # 闈炲紑1鑰佸ぇ琚帓闄� + first_count += 1 + continue if block_codes_infos[i][0] == code: - return i, front_codes + return i - first_count, front_codes else: front_codes.append(block_codes_infos[i][0]) return 0, [] -- Gitblit v1.8.0