From 6918dffd10358f2f6107e15df4f524080d1c218b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=9F=A5=E5=BE=AE?= Date: Wed, 1 Jul 2026 23:21:40 +0800 Subject: [PATCH] fix: restore 0.1s sleep between Eastmoney HK requests (anti-scraping) --- price_monitor.py | 1 + 1 file changed, 1 insertion(+) diff --git a/price_monitor.py b/price_monitor.py index e7fd2a6..7485c24 100644 --- a/price_monitor.py +++ b/price_monitor.py @@ -155,6 +155,7 @@ def fetch_hk_eastmoney(codes): change_pct = str(item.get("f170", "0")) if price > 0: results[code] = (price, change, change_pct) + time.sleep(0.1) # 防止触发东财反爬(逐股查询,不支持批量) except Exception as e: print(f"⚠️ 东方财富 {code} 拉取失败: {e}", file=sys.stderr) continue