From 93e0e0797b49e19f4731f6f17046219e8ceb6b21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=9F=A5=E5=BE=AE?= Date: Thu, 9 Jul 2026 17:57:17 +0800 Subject: [PATCH] =?UTF-8?q?opt:=20100=E5=8F=AA/=E6=89=B9+150ms=E9=97=B4?= =?UTF-8?q?=E9=9A=94=EF=BC=8C=E5=85=A8=E5=B8=82=E5=9C=BA=E6=89=AB=E6=8F=8F?= =?UTF-8?q?41s=E2=86=9213.6s=EF=BC=8C=E9=A2=91=E7=8E=8715=E2=86=9210?= =?UTF-8?q?=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/accumulation_scanner.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/accumulation_scanner.py b/scripts/accumulation_scanner.py index c29d867d..0600e9c5 100644 --- a/scripts/accumulation_scanner.py +++ b/scripts/accumulation_scanner.py @@ -25,9 +25,9 @@ def fetch_qq_batch(symbols): """腾讯批量实时行情""" if not symbols: return {} results = {} - # 分批,每批50个 - for i in range(0, len(symbols), 50): - batch = symbols[i:i+50] + # 分批,每批100个(腾讯推荐上限) + for i in range(0, len(symbols), 100): + batch = symbols[i:i+100] url = f"http://qt.gtimg.cn/q={','.join(batch)}" try: req = urllib.request.Request(url, headers={"User-Agent": UA}) @@ -63,7 +63,7 @@ def fetch_qq_batch(symbols): } except Exception as e: print(f" 批量查询错误: {e}", file=sys.stderr) - time.sleep(0.3) # 批次间隔 + time.sleep(0.15) # 批次间隔150ms(腾讯建议100ms以上,留余量) return results def get_stock_pool():