| | |
| | | line = f.readline() |
| | | while line: |
| | | if line.strip(): |
| | | codes_sh.append(line.strip().encode('utf-8')) |
| | | code = line.strip() |
| | | if not tool.is_can_buy_code(code): |
| | | continue |
| | | codes_sh.append(code.encode('utf-8')) |
| | | line = f.readline() |
| | | |
| | | if os.path.exists(__CODE_SZ_PATH): |
| | | with open(__CODE_SZ_PATH, 'r') as f: |
| | | line = f.readline() |
| | | while line: |
| | | if line.strip(): |
| | | codes_sz.append(line.strip().encode('utf-8')) |
| | | code = line.strip() |
| | | if not tool.is_can_buy_code(code): |
| | | continue |
| | | codes_sz.append(code.encode('utf-8')) |
| | | line = f.readline() |
| | | return codes_sh, codes_sz |
| | | |
| | |
| | | log.close_print() |
| | | while True: |
| | | try: |
| | | if (tool.is_trade_time() and int(tool.get_now_time_str().replace(':', '')) > int("092530")): |
| | | if (tool.is_trade_time() and int(tool.get_now_time_str().replace(':', '')) > int("092530")) or True: |
| | | results = kpl_api.getLimitUpInfoNew() |
| | | result = json.loads(results) |
| | | start_time = time.time() |
| | |
| | | list_ = JueJinApi.get_exchanges_codes(["SHSE", "SZSE"]) |
| | | fdatas = [] |
| | | for d in list_: |
| | | if not tool.is_can_buy_code(d["sec_id"]): |
| | | continue |
| | | # if not tool.is_can_buy_code(d["sec_id"]): |
| | | # continue |
| | | if d["sec_level"] != 1: |
| | | continue |
| | | |