log
2026-07-10 fdee4bbfd48ffbc82628023973c8802d543d642e
scripts/data_update_v2.py
@@ -210,12 +210,12 @@
def to_baostock_code(stock_code):
    """将6位A股代码转换为BaoStock代码格式。"""
    code = str(stock_code).strip().zfill(6)
    if code.startswith(('6', '9')):
    if code.startswith(('4', '8', '9')):
        return f"bj.{code}"
    if code.startswith('6'):
        return f"sh.{code}"
    if code.startswith(('0', '2', '3')):
        return f"sz.{code}"
    if code.startswith(('4', '8')):
        return f"bj.{code}"
    return None