| | |
| | | result_str = self.__process_kpl_data(params) |
| | | self.__send_response(result_str) |
| | | |
| | | def __process_kpl_data(self, data): |
| | | def __process_kpl_data(self, data_origin): |
| | | def do_limit_up(result_list_): |
| | | if result_list_: |
| | | # 保存涨停时间 |
| | |
| | | self.__kplDataManager.save_data(type_, result_list_) |
| | | |
| | | # 将"概念"二字替换掉 |
| | | data = json.loads(json.dumps(data).replace("概念", "")) |
| | | data = json.loads(kpl_util.filter_block(json.dumps(data_origin))) |
| | | type_ = data["type"] |
| | | print("开盘啦type:", type_) |
| | | if type_ == KPLDataType.BIDDING.value: |
| | |
| | | result = json.loads(result) |
| | | if result: |
| | | if "List" in result: |
| | | names = [x["CName"].replace("概念", "") for x in result["List"]] |
| | | names = [kpl_util.filter_block(x["CName"]) for x in result["List"]] |
| | | return names |
| | | return [] |
| | | |
| | |
| | | result = json.loads(result) |
| | | if result: |
| | | if "List" in result: |
| | | names = [x["CName"].replace("概念", "") for x in result["List"]] |
| | | names = [kpl_util.filter_block(x["CName"]) for x in result["List"]] |
| | | return names |
| | | return [] |
| | | |
| | |
| | | if tool.is_trade_time(): |
| | | try: |
| | | results = kpl_api.getLimitUpInfoNew() |
| | | results = kpl_util.filter_block(results) |
| | | result = json.loads(results) |
| | | start_time = time.time() |
| | | __upload_data("limit_up", result) |