fix: 修复6个数据和代码问题
1. 修复 _generate_plain_summary position key 不匹配 (20d→d20, pct→range_pct) 2. 修复 mairui_api.py 日期解析不一致及 float(None) 崩溃风险 3. 修复 fund_flow_analyzer.py 麦蕊回退数据 close_price=0 导致量价背离误判 4. 修复 db_get_fund_flow_history 缺少完整字段和日期过滤 5. 修复 scheduler.py 连接池泄漏 (conn.close() → put_db(conn)) 6. 修复多处北交所股票代码映射缺失 (8/9开头→bj)
This commit is contained in:
@@ -61,7 +61,7 @@ def analyze():
|
||||
# 3. 获取实时价格补充到结果(优先腾讯API,兼容腾讯云)
|
||||
try:
|
||||
import requests as _req
|
||||
_tcode = ('sh' if stock_code.startswith('6') else 'sz') + stock_code
|
||||
_tcode = ('sh' if stock_code.startswith('6') else 'bj' if stock_code.startswith(('8', '9')) else 'sz') + stock_code
|
||||
_r = _req.get(f'http://qt.gtimg.cn/q={_tcode}', timeout=5,
|
||||
headers={'Referer': 'https://finance.qq.com'})
|
||||
if _r.status_code == 200 and '\"' in _r.text:
|
||||
|
||||
Reference in New Issue
Block a user