| | |
| | | __log_file_contents[md5] = (time.time(), contents) |
| | | return contents |
| | | |
| | | # 加载板块强度日志 |
| | | def load_market_sift_plate(date=tool.get_now_date_str()): |
| | | """ |
| | | 获取精选流入的成分股 |
| | | :param date: |
| | | :return: |
| | | """ |
| | | path = f"{constant.get_path_prefix()}/low_suction_log/gp/kpl/market_sift_plate.{date}.log" |
| | | fdatas = [] |
| | | if os.path.exists(path): |
| | | with open(path, 'r', encoding="utf-8") as f: |
| | | lines = f.readlines() |
| | | for line in lines: |
| | | if line: |
| | | time_str = __get_log_time(line) |
| | | try: |
| | | data = line.split(" - ")[1].strip() |
| | | data_dict = eval(data) |
| | | fdatas.append((time_str, data_dict)) |
| | | except: |
| | | pass |
| | | return fdatas |
| | | |
| | | def load_stock_of_markets_plate(date=tool.get_now_date_str()): |
| | | |
| | | # 加载个股强度日志 |
| | | def load_kpl_market_stock_heat(date=tool.get_now_date_str()): |
| | | """ |
| | | 获取精选流入的成分股 |
| | | :param date: |
| | |
| | | |
| | | |
| | | if __name__ == '__main__': |
| | | datas = load_kpl_market_strong() |
| | | datas = load_market_sift_plate() |
| | | fdatas = [] |
| | | for data in datas: |
| | | # (距离09:15:00的秒数, 时间, 强度) |