This commit is contained in:
songzhuoyuan
2026-08-11 20:41:31 +08:00
parent 2ce13e5bae
commit befdc32aea
24 changed files with 1311 additions and 530 deletions
+2 -1
View File
@@ -8,6 +8,7 @@
import logging
from typing import Tuple, Optional
import pandas as pd
from http_timeout import call_with_timeout
class SmallCapSelector:
@@ -54,7 +55,7 @@ class SmallCapSelector:
self.logger.info(f"开始执行小市值策略选股,查询条件: {query}")
# 调用pywencai
result = pywencai.get(query=query, loop=True)
result = call_with_timeout(pywencai.get, timeout=30, query=query, loop=True)
if result is None or result.empty:
self.logger.warning("未获取到符合条件的股票")